Summary
When using shopware-cli project create … --docker, the CLI writes a generated COMPOSE_PROJECT_NAME into the project .env (format sw-<basename>-<6 hex>). That is useful for local uniqueness, but there is currently no create flag (or documented create-time override) to choose a custom value.
For CD / multi-env setups we often want Compose’s project name to follow a stable identity (e.g. <shop-id>-<env>), not a random local slug. Today the only options are to edit .env after create or remove the key for stacks that derive name: themselves.
Current behaviour
- Docker scaffolds call into
EnvFileContent / GenerateComposeProjectName and write COMPOSE_PROJECT_NAME=sw-… into .env.
EnsureComposeProjectName leaves an existing value untouched, but create itself always generates one for docker projects.
- Documented create flags cover things like
--docker, --local-domain, --no-interaction, version, etc. — not compose project naming.
Request
Please make host-side .env values that create writes — at least COMPOSE_PROJECT_NAME — modifiable at project create time, ideally via CLI flags (and/or documented env overrides that create respects when writing .env).
Suggested shape (illustrative)
shopware-cli project create my-shop --docker \
--compose-project-name=acme-live
Or a small set of --env KEY=VALUE / --env-file options for any keys create would otherwise generate.
Acceptance ideas
Why it matters
Teams using image-based CD with a separate VPS Compose stack often treat shop id + deploy env as the Compose identity. A random COMPOSE_PROJECT_NAME from create overrides Compose name: when the same .env is reused, which is easy to miss and breaks multi-shop / live+staging isolation expectations.
Being able to set this at create time (instead of a manual post-edit) would keep the local docker path and CD path aligned and scriptable.
Environment
- Observed with recent
shopware-cli docker create (Shopware 6.7.x scaffolds)
- Related implementation:
internal/shop/compose_project_name.go (GenerateComposeProjectName, EnvFileContent)
Summary
When using
shopware-cli project create … --docker, the CLI writes a generatedCOMPOSE_PROJECT_NAMEinto the project.env(formatsw-<basename>-<6 hex>). That is useful for local uniqueness, but there is currently no create flag (or documented create-time override) to choose a custom value.For CD / multi-env setups we often want Compose’s project name to follow a stable identity (e.g.
<shop-id>-<env>), not a random local slug. Today the only options are to edit.envafter create or remove the key for stacks that derivename:themselves.Current behaviour
EnvFileContent/GenerateComposeProjectNameand writeCOMPOSE_PROJECT_NAME=sw-…into.env.EnsureComposeProjectNameleaves an existing value untouched, but create itself always generates one for docker projects.--docker,--local-domain,--no-interaction, version, etc. — not compose project naming.Request
Please make host-side
.envvalues that create writes — at leastCOMPOSE_PROJECT_NAME— modifiable atproject createtime, ideally via CLI flags (and/or documented env overrides that create respects when writing.env).Suggested shape (illustrative)
Or a small set of
--env KEY=VALUE/--env-fileoptions for any keys create would otherwise generate.Acceptance ideas
project create --docker --compose-project-name=<name>writes that exact value to.envsw-<basename>-<hash>when the flag is omitted (no behaviour change for existing users)project create --helpand the CLI docsWhy it matters
Teams using image-based CD with a separate VPS Compose stack often treat shop id + deploy env as the Compose identity. A random
COMPOSE_PROJECT_NAMEfrom create overrides Composename:when the same.envis reused, which is easy to miss and breaks multi-shop / live+staging isolation expectations.Being able to set this at create time (instead of a manual post-edit) would keep the local docker path and CD path aligned and scriptable.
Environment
shopware-clidocker create (Shopware 6.7.x scaffolds)internal/shop/compose_project_name.go(GenerateComposeProjectName,EnvFileContent)