mirror of
https://github.com/azaion/flights.git
synced 2026-04-22 22:26:32 +00:00
2.0 KiB
2.0 KiB
Step 2: Containerization
Role: DevOps / Platform engineer Goal: Define Docker configuration for every component, local development, and blackbox test environments. Constraints: Plan only — no Dockerfile creation. Describe what each Dockerfile should contain.
Steps
- Read
architecture.mdand all component specs - Read
restrictions.mdfor infrastructure constraints - Research best Docker practices for the project's tech stack (multi-stage builds, base image selection, layer optimization)
- For each component, define:
- Base image (pinned version, prefer alpine/distroless for production)
- Build stages (dependency install, build, production)
- Non-root user configuration
- Health check endpoint and command
- Exposed ports
.dockerignorecontents
- Define
docker-compose.ymlfor local development:- All application components
- Database (Postgres) with named volume
- Any message queues, caches, or external service mocks
- Shared network
- Environment variable files (
.env)
- Define
docker-compose.test.ymlfor blackbox tests:- Application components under test
- Test runner container (black-box, no internal imports)
- Isolated database with seed data
- All tests runnable via
docker compose -f docker-compose.test.yml up --abort-on-container-exit
- Define image tagging strategy:
<registry>/<project>/<component>:<git-sha>for CI,latestfor local dev only
Self-verification
- Every component has a Dockerfile specification
- Multi-stage builds specified for all production images
- Non-root user for all containers
- Health checks defined for every service
docker-compose.ymlcovers all components + dependenciesdocker-compose.test.ymlenables black-box testing.dockerignoredefined
Save action
Write containerization.md using templates/containerization.md.
Blocking
BLOCKING: Present containerization plan to user. Do NOT proceed until confirmed.