services: api: build: context: . dockerfile: Dockerfile ports: - "8081:8081" environment: - PORT=8081 - DATABASE_URL=postgresql://focusflow:focusflow@postgres:5432/focusflow - REDIS_URL=redis://redis:6379 - JWT_SECRET=${JWT_SECRET:-dev-secret-change-in-production} - APP_ENV=development depends_on: postgres: condition: service_healthy redis: condition: service_healthy restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8081/health"] interval: 30s timeout: 5s retries: 3 start_period: 10s postgres: image: postgres:16-alpine ports: - "5433:5432" environment: POSTGRES_DB: focusflow POSTGRES_USER: focusflow POSTGRES_PASSWORD: focusflow volumes: - pg_data:/var/lib/postgresql/data - ./migrations:/docker-entrypoint-initdb.d healthcheck: test: ["CMD-SHELL", "pg_isready -U focusflow -d focusflow"] interval: 10s timeout: 5s retries: 5 restart: unless-stopped redis: image: redis:7-alpine ports: - "6380:6379" volumes: - redis_data:/data command: redis-server --appendonly yes healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 restart: unless-stopped volumes: pg_data: redis_data: