version: '3.8' services: infra-core: build: context: . target: production-debug container_name: infra-core restart: unless-stopped # Override the CMD to use sh instead of relying on shebang command: ["/bin/sh", "/usr/local/bin/start-services.sh"] ports: - "80:80" # Gate HTTP - "443:443" # Gate HTTPS - "8082:8082" # Console API # All services enabled with fallback ports - "${ORCHESTRATOR_PORT:-9090}:9090" # Orchestrator (fallback: 19090) - "${PROBE_PORT:-8085}:8085" # Probe Monitor (fallback: 18085) - "${SNAP_PORT:-8086}:8086" # Snap Service (fallback: 18086) volumes: - infra_data:/var/lib/infra-core - infra_logs:/var/log/infra-core - ./certs:/etc/infra-core/certs - ./configs:/app/configs:ro # Mount configs as read-only - /var/run/docker.sock:/var/run/docker.sock # For container management environment: - INFRA_CORE_ENV=production - INFRA_CORE_JWT_SECRET=${JWT_SECRET:-} - INFRA_CORE_ACME_EMAIL=${ACME_EMAIL:-admin@example.com} # Service control - set to "true" to enable optional services - ENABLE_ORCHESTRATOR=${ENABLE_ORCHESTRATOR:-true} - ENABLE_PROBE_MONITOR=${ENABLE_PROBE_MONITOR:-true} - ENABLE_SNAP_SERVICE=${ENABLE_SNAP_SERVICE:-true} # Service port configuration - INFRA_CORE_ORCH_PORT=${ORCHESTRATOR_PORT:-9090} - INFRA_CORE_PROBE_PORT=${PROBE_PORT:-8085} - INFRA_CORE_SNAP_PORT=${SNAP_PORT:-8086} networks: - infra-network depends_on: - watchtower labels: - "com.centurylinklabs.watchtower.enable=true" watchtower: image: containrrr/watchtower:latest container_name: watchtower restart: unless-stopped volumes: - /var/run/docker.sock:/var/run/docker.sock command: --interval 3600 --cleanup networks: - infra-network volumes: infra_data: driver: local infra_logs: driver: local networks: infra-network: driver: bridge