diff --git a/cli/app/new.go b/cli/app/new.go index 4c3d4243..e357a9f3 100644 --- a/cli/app/new.go +++ b/cli/app/new.go @@ -269,8 +269,8 @@ func ensureSecretLengths(secrets map[string]string, domainName string, sanitised domainAndFormatLength := len(sanitisedAppName) + 4 for secretName := range secrets { - if len(secretName)+domainAndFormatLength > 64 { - return fmt.Errorf("%s is too long (> 64 chars when combined with %s)", secretName, sanitisedAppName) + if len(secretName)+domainAndFormatLength > config.MAX_DOCKER_SECRET_LENGTH { + return fmt.Errorf("%s is too long (> %d chars when combined with %s)", secretName, config.MAX_DOCKER_SECRET_LENGTH, sanitisedAppName) } } diff --git a/pkg/config/env.go b/pkg/config/env.go index 98891880..c351b77f 100644 --- a/pkg/config/env.go +++ b/pkg/config/env.go @@ -35,6 +35,7 @@ var CATALOGUE_JSON_REPO_NAME = "recipes-catalogue-json" var SSH_URL_TEMPLATE = "ssh://git@git.coopcloud.tech:2222/coop-cloud/%s.git" const MAX_SANITISED_APP_NAME_LENGTH = 45 +const MAX_DOCKER_SECRET_LENGTH = 64 // GetServers retrieves all servers. func GetServers() ([]string, error) {