feat: require ENVIRONMENT=dev|prod for all deploy targets#47
Merged
Conversation
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
f7335d4 to
0f85b39
Compare
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.
Summary
ENVIRONMENT=dev|prodto be set explicitly.env.deploy.dev,.env.deploy.prod) with isolated Cloudflare and Modal resourcesvalet-backendinapp.pyand the Makefile's${PROJECT_NAME}-backendderivationdev-worker,dev-client, etc.) are unchangedUsage:
Test plan
make deploywithout ENVIRONMENT errors with clear messageENVIRONMENT=prod make deploywithout.env.deploy.proderrors with clear messageENVIRONMENT=dev make deploy --dry-runresolves config and runs deploy scriptENVIRONMENT=dev make deployruns full deploy against dev environment