Skip to content

fix(tsforge): route app-feature env to compose api.${STACK}.env#225

Open
agjs wants to merge 1 commit into
mainfrom
fix/scaffold-app-env-stack-path
Open

fix(tsforge): route app-feature env to compose api.${STACK}.env#225
agjs wants to merge 1 commit into
mainfrom
fix/scaffold-app-env-stack-path

Conversation

@agjs

@agjs agjs commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

What

Follow-up to #224. Corrects envFileDefault in .tsforge/scaffold-manifest.json.

#224 routed app-feature vars (EMAIL_PROVIDER, BILLING_ENABLED, AI_*, …) to apps/api/.env. But docker-compose.yml loads the api container's env via env_file:

  • api-dev./api.dev.env
  • prod api./api.prod.env

apps/api/.env is read only by standalone bun run dev — never by the compose stack that the scaffold wizard actually boots (setup.sh --updev.sh up). So app-feature toggles set by the wizard would have landed in a file the running containers ignore.

Fix

-  "envFileDefault": "apps/api/.env",
+  "envFileDefault": "infra/compose/compose/api.${STACK}.env",

The wizard resolves the ${STACK} placeholder (devapi.dev.env, prodapi.prod.env; smoke shares the dev file). Infra toggles (compose/.env) and identity/observability secrets were already routed correctly and are unchanged.

Validated: manifest parses, zero coverage gaps, and edits now resolve to api.dev.env / api.prod.env by stack.

The compose api service loads its env from infra/compose/compose/api.dev.env
(dev) / api.prod.env (prod) via docker-compose.yml `env_file`. apps/api/.env is
only read by standalone `bun run dev`, never by the compose stack the scaffold
wizard boots. Point envFileDefault at the compose api env file with a ${STACK}
placeholder the wizard resolves (smoke shares the dev file).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant