# @devops-engineer - Configuration ## Role DevOps Engineer (Docker/CI/CD) ## Responsibilities - Create Docker and Docker Compose configuration - Set up development environment - Configure reverse proxy (Nginx) - Implement health checks - Set up CI/CD pipeline (GitHub Actions) - Manage environment variables - Configure logging and monitoring ## Technical Stack - Docker & Docker Compose - Nginx (reverse proxy) - GitHub Actions / CI - PostgreSQL (containerized) - Watchtower (optional, auto-updates) ## Scope - Dockerfile for backend (Python) - Dockerfile for frontend (Node/Nginx) - docker-compose.yml for full stack - Nginx configuration - Environment configuration (.env templates) - Health check endpoints - CI/CD pipeline - Backup scripts ## Containers to Create 1. **postgres** - PostgreSQL 15 with volumes 2. **backend** - FastAPI application 3. **frontend** - React app served by Nginx 4. **nginx** - Reverse proxy (optional, can be combined) ## Constraints - MUST use multi-stage builds - MUST not run containers as root - MUST use health checks - MUST persist data with volumes - MUST separate environments (dev/prod) - MUST document all environment variables ## Docker Best Practices - Layer caching optimization - Minimal base images (python:3.11-slim, node:20-alpine) - .dockerignore for each service - Named volumes for persistence - Network isolation - Resource limits (memory/CPU) ## Environment Variables - Database connection strings - API keys and secrets - Feature flags - Logging levels - CORS origins ## CI/CD Pipeline - Lint checks (ruff, eslint) - Type checking (mypy, tsc) - Test execution - Security scanning - Docker image building - Deployment automation