# CHORUS Services Website - Local Development Environment # Docker Compose configuration for development and testing version: '3.8' services: # Website Development Server website-dev: build: context: . dockerfile: Dockerfile.dev target: development container_name: chorus-website-dev ports: - "3000:3000" - "3001:3001" # For Next.js dev server HMR volumes: # Mount source code for hot reloading - .:/app - /app/node_modules - /app/.next environment: - NODE_ENV=development - NEXT_TELEMETRY_DISABLED=1 - CHOKIDAR_USEPOLLING=true # For file watching in containers - WATCHPACK_POLLING=true command: npm run dev healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000/"] interval: 30s timeout: 10s retries: 3 start_period: 10s networks: - chorus-dev # Website Production Build (for testing) website-prod: build: context: . dockerfile: Dockerfile target: runner container_name: chorus-website-prod ports: - "8080:80" - "8081:3000" environment: - NODE_ENV=production - NEXT_TELEMETRY_DISABLED=1 profiles: - production # Only start with: docker-compose --profile production up healthcheck: test: ["CMD", "node", "/app/healthcheck.js"] interval: 30s timeout: 10s retries: 3 start_period: 15s networks: - chorus-dev # Nginx for local SSL testing (optional) nginx-ssl: image: nginx:1.25-alpine container_name: chorus-nginx-ssl ports: - "443:443" - "80:80" volumes: - ./docker/nginx-dev.conf:/etc/nginx/nginx.conf:ro - ./docker/ssl:/etc/nginx/ssl:ro depends_on: - website-dev profiles: - ssl # Only start with: docker-compose --profile ssl up networks: - chorus-dev # Redis for caching (development) redis-dev: image: redis:7-alpine container_name: chorus-redis-dev ports: - "6379:6379" volumes: - redis_dev_data:/data command: redis-server --appendonly yes profiles: - cache # Only start with: docker-compose --profile cache up networks: - chorus-dev # Development database (if needed for future features) postgres-dev: image: postgres:15-alpine container_name: chorus-postgres-dev ports: - "5432:5432" environment: - POSTGRES_DB=chorus_dev - POSTGRES_USER=chorus - POSTGRES_PASSWORD=chorusdev volumes: - postgres_dev_data:/var/lib/postgresql/data - ./docker/init-dev-db.sql:/docker-entrypoint-initdb.d/init.sql profiles: - database # Only start with: docker-compose --profile database up networks: - chorus-dev # Mailhog for email testing (development) mailhog: image: mailhog/mailhog:latest container_name: chorus-mailhog ports: - "1025:1025" # SMTP - "8025:8025" # Web UI profiles: - email # Only start with: docker-compose --profile email up networks: - chorus-dev volumes: redis_dev_data: postgres_dev_data: networks: chorus-dev: driver: bridge name: chorus-dev-network