# POST3-010: Production Docker Compose setup **Status:** Todo **Priority:** P1 **Blocked by:** POST3-009 ## Description Create a production-oriented Docker Compose setup that runs post3-server alongside PostgreSQL, with proper networking, health checks, and configuration. ## Acceptance Criteria - [ ] `Dockerfile` (multi-stage) for post3-server: - Builder stage: rust image, compile release binary - Runtime stage: debian-slim or alpine, copy binary + migrations - Health check endpoint (add `GET /health` to router) - Non-root user - [ ] `templates/docker-compose.production.yaml`: - `postgres` service (PostgreSQL 18, persistent volume, health check) - `post3` service (built image, depends_on postgres healthy, DATABASE_URL from env) - Named volumes for PostgreSQL data - Internal network - Port 9000 exposed for post3 - [ ] `templates/.env.example` — sample env file for production - [ ] `GET /health` endpoint on the server (returns 200 when DB is reachable) - [ ] `mise.toml` tasks: - `prod:up` — start production compose - `prod:down` — stop production compose - `prod:build` — build the Docker image - [ ] README section on production deployment ## Notes The CI pipeline (POST3-009) will produce the container image. This ticket handles the compose orchestration for self-hosted deployment.