diff --git a/TODO.md b/TODO.md index fa04e9d..55311e3 100644 --- a/TODO.md +++ b/TODO.md @@ -31,7 +31,7 @@ ### DevOps - [x] Create Dockerfile for backend - [x] Create Dockerfile for frontend (nginx) -- [ ] Write docker-compose.yml +- [x] Write docker-compose.yml - [ ] Test local deployment ### Documentation @@ -45,6 +45,21 @@ ## ✅ Completed Tasks ### 2026-03-24 +- **Docker Compose orchestration** (Iteration 16) + - Created docker-compose.yml with backend and frontend services + - Backend service: Node.js API on port 3000 with named volume for SQLite persistence (recipe-data:/app/data) + - Frontend service: nginx on port 8080, depends on backend health check + - Configured nginx to proxy /api/* requests to backend service (http://backend:3000) + - Updated frontend API client (services/api.ts) to use relative URLs (/api instead of http://localhost:3000/api) + - Added Vite dev server proxy configuration for local development (proxies /api to localhost:3000) + - Implemented health checks for both services (backend: GET /api/recipes, frontend: GET /health) + - Configured restart policies (unless-stopped) and service dependencies + - Created internal Docker network (recipe-network) for service communication + - Added comprehensive documentation in docs/docker-compose.md (architecture, usage, troubleshooting, testing) + - Supports both local development (npm run dev with Vite proxy) and production deployment (Docker Compose) + - Verified: YAML syntax valid, all 5 files committed + - Next: Test local deployment (docker compose up -d && docker compose ps) + - **Frontend Dockerfile implementation** (Iteration 15) - Created multi-stage Dockerfile for frontend build and deployment - Builder stage: Node.js 22 Alpine with npm ci, TypeScript compilation, Vite production build