services: # Skynet Backend (Central Orchestration Service) skynet-backend: container_name: skynet_backend image: ${ECR_REGISTRY}${ECR_REGISTRY:+/}skynet-backend:${SKYNET_TAG} restart: unless-stopped ports: - "${SKYNET_PORT}:8080" networks: - skynet-network environment: # Spring Boot Configuration SPRING_PROFILES_ACTIVE: ${SPRING_PROFILE:-production} SERVER_PORT: 8080 # JVM Configuration JAVA_OPTS: >- -XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0 -XX:+UseG1GC -XX:+UseStringDeduplication -Djava.security.egd=file:/dev/./urandom volumes: - skynet-logs:/app/logs # Resource limits mem_limit: ${BACKEND_MEMORY_LIMIT} memswap_limit: ${BACKEND_MEMORY_LIMIT} # Health check healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"] interval: 30s timeout: 10s retries: 3 start_period: 60s # Logging configuration logging: driver: "json-file" options: max-size: "10m" max-file: "3" # Skynet UI Frontend skynet-ui: container_name: skynet_ui image: ${ECR_REGISTRY}${ECR_REGISTRY:+/}skynet-ui:${UI_TAG} restart: unless-stopped ports: - "${UI_PORT:-3000}:80" networks: - skynet-network # Frontend uses relative '/api' paths which nginx proxies to backend # No VITE_SKYNET_API_URL needed since we want the default '/api' behavior depends_on: skynet-backend: condition: service_healthy # Resource limits mem_limit: ${UI_MEMORY_LIMIT} memswap_limit: ${UI_MEMORY_LIMIT} # Health check healthcheck: test: ["CMD", "curl", "-f", "http://localhost:80/health"] interval: 30s timeout: 10s retries: 3 start_period: 10s # Logging configuration logging: driver: "json-file" options: max-size: "5m" max-file: "3" volumes: skynet-logs: driver: local networks: skynet-network: driver: bridge name: skynet-central