version: '3.8' services: backend: build: context: ./backend dockerfile: Dockerfile container_name: mojito-backend ports: - "${BACKEND_PORT:-5000}:5000" env_file: - ./backend/.env environment: - NODE_ENV=${NODE_ENV:-production} - PORT=5000 - CORS_ORIGIN=https://people.marketingmojito.com restart: unless-stopped healthcheck: test: ["CMD", "node", "-e", "require('http').get('http://localhost:5000/api/healthz', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"] interval: 30s timeout: 3s retries: 3 start_period: 10s networks: - mojito-network # Frontend is deployed to S3/CloudFront, not running on EC2 # frontend: # build: # context: ./frontend # dockerfile: Dockerfile # container_name: mojito-frontend # ports: # - "${FRONTEND_PORT:-3000}:80" # environment: # - REACT_APP_SUPABASE_URL=${REACT_APP_SUPABASE_URL:-} # - REACT_APP_SUPABASE_ANON_KEY=${REACT_APP_SUPABASE_ANON_KEY:-} # - REACT_APP_API_URL=${REACT_APP_API_URL:-http://localhost:5000/api} # env_file: # - ./frontend/.env # depends_on: # - backend # restart: unless-stopped # healthcheck: # test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/health"] # interval: 30s # timeout: 3s # retries: 3 # start_period: 10s # networks: # - mojito-network networks: mojito-network: driver: bridge