Interview Prep/Docker/CI/CD and production rollouts

Manage multiple environments with one Compose repo.

BeginnerScenarioCI/CD and production rollouts
Answer

Situation read → dev/staging/prod variants.

What I'd do → compose.yaml base + compose.<env>.yaml overrides, --env-file .env.<env>, and COMPOSE_PROJECT_NAME per environment so networks and volumes are separated. Validate with docker compose config.

Why → Project names isolate resources on the same host.

Interview tip → Use profiles for optional services (e.g., debug).

All Docker questions Roadmap: Docker & containers

More on CI/CD and production rollouts