version: '3.8' services: # Backend Service serena-backend: build: context: . dockerfile: Dockerfile container_name: serena-backend ports: - "8080:8080" environment: - SPRING_PROFILES_ACTIVE=docker - SERVER_PORT=8080 - SPRING_WEB_CORS_ALLOWED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"] interval: 30s timeout: 10s retries: 3 start_period: 60s restart: unless-stopped networks: - serena-network # Frontend Development Service (alternative to built-in static files) serena-frontend: build: context: ./frontend dockerfile: Dockerfile.dev container_name: serena-frontend ports: - "3000:3000" environment: - REACT_APP_API_URL=http://localhost:8080 - CHOKIDAR_USEPOLLING=true volumes: - ./frontend:/app - /app/node_modules depends_on: - serena-backend networks: - serena-network profiles: - development # Production Frontend (served by backend) serena-app: build: context: . dockerfile: Dockerfile container_name: serena-app ports: - "80:8080" environment: - SPRING_PROFILES_ACTIVE=production - SERVER_PORT=8080 restart: unless-stopped networks: - serena-network profiles: - production networks: serena-network: driver: bridge volumes: node_modules: