Repository navigation
feat: host .env.local owns deploy env; local Compose name matches VPS - #40
Merged
Merged
Conversation
Align Flex recipe docs and tests with the locked env init contract: set COMPOSE_PROJECT_NAME=shopware-<shop-id> (no env suffix) instead of commenting out create's line. Compose name: interpolation still exists; COMPOSE_PROJECT_NAME wins per Docker Compose precedence and is intentional. Co-authored-by: ROBJkE <ROBJkE@users.noreply.github.com>
Clarify that env init sets COMPOSE_PROJECT_NAME=shopware-<shop-id> for
laptop project dev / shop-root compose. VPS stacks keep
${SHOPWARE_SHOP_ID}-${SHOPWARE_DEPLOY_ENV} (acme-live); fyrst-cli pins
-p or unsets the env var so .env does not override. Live and staging
on one host stay isolated.
Co-authored-by: ROBJkE <ROBJkE@users.noreply.github.com>
…shared .env Shared committed .env no longer carries env-specific SHOPWARE_DEPLOY_ENV or COMPOSE_PROJECT_NAME. Flex omits deploy env from the marker block; env init comments create's sw-… line; host .env.local owns deploy env. VPS project name <shop-id>-<env> is derived at runtime (CLI may pin -p). Co-authored-by: ROBJkE <ROBJkE@users.noreply.github.com>
0.2.0 does not create .env.local yet; avoid grep noise on that path. Co-authored-by: ROBJkE <ROBJkE@users.noreply.github.com>
…ide.yaml env init writes SHOPWARE_DEPLOY_ENV and COMPOSE_PROJECT_NAME=<shop-id>-<env> to gitignored .env.local (acme-dev locally, acme-live on VPS) and sets compose.override.yaml name: so shopware-cli project dev sees it. Shared .env still has no COMPOSE_PROJECT_NAME and no real SHOPWARE_DEPLOY_ENV. Co-authored-by: ROBJkE <ROBJkE@users.noreply.github.com>
…local then .env.prod Raw operator Compose must pass the same --env-file flags as fyrst-cli (not only .env). -p stays a matching pin, not the naming SoT. Shared .env still has no COMPOSE_PROJECT_NAME and no real SHOPWARE_DEPLOY_ENV. Co-authored-by: ROBJkE <ROBJkE@users.noreply.github.com>
… chain Do not document fyrst-cli passing -p or treating -p as a matching pin. Raw Compose examples stay --env-file .env, .env.local, then .env.prod if present. Co-authored-by: ROBJkE <ROBJkE@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrite this private Flex recipe for the locked file layout:
.env: noCOMPOSE_PROJECT_NAME, no realSHOPWARE_DEPLOY_ENV.fyrst-cli shopware env initstrips (comments out) create’sCOMPOSE_PROJECT_NAME=sw-…. Flex omitsSHOPWARE_DEPLOY_ENVfrom the marker block..env.local(gitignored): holdsSHOPWARE_DEPLOY_ENVandCOMPOSE_PROJECT_NAME=<shop-id>-<env>(acme-devlocally,acme-liveon VPS — same pattern, not the folder basename and notshopware-<shop-id>).compose.override.yamlname:soshopware-cli project devsees that project name.deploy/compose.yamlname: ${SHOPWARE_SHOP_ID}-${SHOPWARE_DEPLOY_ENV}with host env files loaded. fyrst-cli (and raw operator Compose) pass--env-file .envthen--env-file .env.localthen--env-file .env.prod(if present). No-p.What changed
Operator-facing recipe text (
post-install.txt, recipe README, repo README):envno longer stampsSHOPWARE_DEPLOY_ENV=liveinto committed.env(manifest.jsonomits the key).COMPOSE_PROJECT_NAME=sw-shop-…in committed.env.shopware-<shop-id>local vs VPS) are gone. Local/dev uses the same<shop-id>-<env>formula as VPS.--env-file .envonly. Raw operator Compose must use the same--env-filechain; omit.env.prodwhen absent. Docs do not say fyrst-cli passes-por that-pis a matching pin. Raw Compose examples do not use-p.--vps. Flex still does not delete create’s line oncomposer require.Tests:
tests/init-env.test.sh: docs must say.env.local+compose.override.yamluseacme-dev/acme-liveand VPS compose uses--env-file .env.local/.env.prod. Docs must not mention-p/ matching pin. CLI checks assert deploy env +COMPOSE_PROJECT_NAME=<shop-id>-<env>land in.env.local, leftover Flex deploy env is migrated out of.env, create’ssw-…line is commented, and overridename:matches.tests/vps-hardening.test.sh: same docs contract. Createsw-shop-…warning + deploy-release footgun check stay.tests/wrappers.test.sh/ sync tests:--vpsstill rejected; identity fixtures use.env.local.This recipe is thin (
copy-from-package). Overlay bytes live in fyrst-dev/shopware-cd. Tests callfyrst-clidirectly.Out of this PR
SHOPWARE_DEPLOY_ENV+COMPOSE_PROJECT_NAME=<shop-id>-<env>to.env.local; setcompose.override.yamlname:; pass--env-file .envthen.env.localthen.env.prodif present; do not pass-p; stop writing those keys into committed.env; keep commenting create’sCOMPOSE_PROJECT_NAME). Do not change CLI here.Tests (this revision, fyrst-cli 0.2.0)
wrappers.test.shvps-hardening.test.shinit-env.test.sh--vps/ Flex omit /--env-filechain / no-ppass; 7.env.local+ override identity checks fail until CLI writes those keys and setscompose.override.yamlname:CLI behavioral checks for
.env.local/compose.override.yamlneed the post-layout binary (parallel CLI change).