Skip to content

feat: require ENVIRONMENT=dev|prod for all deploy targets#47

Merged
yourbuddyconner merged 1 commit into
mainfrom
feat/multi-environment-deploy
May 7, 2026
Merged

feat: require ENVIRONMENT=dev|prod for all deploy targets#47
yourbuddyconner merged 1 commit into
mainfrom
feat/multi-environment-deploy

Conversation

@yourbuddyconner
Copy link
Copy Markdown
Owner

Summary

  • All deploy, bootstrap, and destroy targets now require ENVIRONMENT=dev|prod to be set explicitly
  • Each environment gets its own config file (.env.deploy.dev, .env.deploy.prod) with isolated Cloudflare and Modal resources
  • Modal app name is now parameterized via env var, fixing the mismatch between the hardcoded valet-backend in app.py and the Makefile's ${PROJECT_NAME}-backend derivation
  • Local dev targets (dev-worker, dev-client, etc.) are unchanged

Usage:

ENVIRONMENT=dev make deploy           # full deploy to dev
ENVIRONMENT=prod make deploy-worker   # just the worker to prod
ENVIRONMENT=prod make bootstrap       # first-time resource creation
ENVIRONMENT=prod make bootstrap-secrets  # set OAuth creds

Test plan

  • make deploy without ENVIRONMENT errors with clear message
  • ENVIRONMENT=prod make deploy without .env.deploy.prod errors with clear message
  • ENVIRONMENT=dev make deploy --dry-run resolves config and runs deploy script
  • ENVIRONMENT=dev make deploy runs full deploy against dev environment

Deployment previously used a single .env.deploy file with no environment
separation. This made it impossible to deploy to dev and prod from the
same checkout without manually swapping config files.

Now all deploy, bootstrap, and destroy targets require ENVIRONMENT to be
set explicitly (e.g. ENVIRONMENT=prod make deploy). Each environment gets
its own config file (.env.deploy.dev, .env.deploy.prod) and its own
isolated set of Cloudflare and Modal resources.

- deploy.sh sources .env.deploy.${ENVIRONMENT} instead of .env.deploy
- Makefile adds _require-env guard on deploy/bootstrap/destroy targets
- Modal app name is parameterized via MODAL_APP_NAME env var (fixes
  mismatch between hardcoded "valet-backend" in app.py and Makefile's
  ${PROJECT_NAME}-backend derivation)
- Local dev targets (dev-worker, dev-client, etc.) unchanged
@yourbuddyconner yourbuddyconner force-pushed the feat/multi-environment-deploy branch from f7335d4 to 0f85b39 Compare May 7, 2026 17:31
@yourbuddyconner yourbuddyconner merged commit 087bf4e into main May 7, 2026
1 check passed
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