version: '3.8' services: # Main Astro SSR Application web: build: context: . dockerfile: Dockerfile container_name: 365devnet-web restart: unless-stopped ports: - "3000" environment: - NODE_ENV=production - PORT=3000 - ENABLE_SSR_CSP=1 # Add your other environment variables here # - GEMINI_API_KEY=${GEMINI_API_KEY} # - EMAIL_USER=${EMAIL_USER} # - EMAIL_PASS=${EMAIL_PASS} env_file: - .env volumes: # Mount logs directory if you want to persist logs - ./logs:/app/logs networks: - devnet healthcheck: test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})"] interval: 30s timeout: 10s retries: 3 start_period: 40s # Nginx Reverse Proxy (Optional - for SSL termination & caching) nginx: image: nginx:stable-alpine container_name: 365devnet-nginx restart: unless-stopped ports: - "80:80" - "443:443" volumes: - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro # Add SSL certificates if you have them # - ./ssl/cert.pem:/etc/nginx/ssl/cert.pem:ro # - ./ssl/key.pem:/etc/nginx/ssl/key.pem:ro depends_on: web: condition: service_healthy networks: - devnet networks: devnet: driver: bridge # Optional: Add volumes for persistent data volumes: logs: