mirror of
https://github.com/azaion/loader.git
synced 2026-04-22 21:46:32 +00:00
1.7 KiB
1.7 KiB
Step 4: Environment Strategy
Role: Platform engineer Goal: Define environment configuration, secrets management, and environment parity. Constraints: Strategy document — no secrets or credentials in output.
Steps
- Define environments:
| Environment | Purpose | Infrastructure | Data |
|---|---|---|---|
| Development | Local developer workflow | docker-compose, local volumes | Seed data, mocks for external APIs |
| Staging | Pre-production validation | Mirrors production topology | Anonymized production-like data |
| Production | Live system | Full infrastructure | Real data |
- Define environment variable management:
- Reference
.env.examplecreated in Step 1 - Per-environment variable sources (
.envfor dev, secret manager for staging/prod) - Validation: fail fast on missing required variables at startup
- Reference
- Define secrets management:
- Never commit secrets to version control
- Development:
.envfiles (git-ignored) - Staging/Production: secret manager (AWS Secrets Manager / Azure Key Vault / Vault)
- Rotation policy
- Define database management per environment:
- Development: Docker Postgres with named volume, seed data
- Staging: managed Postgres, migrations applied via CI/CD
- Production: managed Postgres, migrations require approval
Self-verification
- All three environments defined with clear purpose
- Environment variable documentation complete (references
.env.examplefrom Step 1) - No secrets in any output document
- Secret manager specified for staging/production
- Database strategy per environment
Save action
Write environment_strategy.md using templates/environment_strategy.md.