services: postgres: image: postgres:16 container_name: groundcontrol-db environment: POSTGRES_DB: groundcontrol POSTGRES_USER: postgres POSTGRES_PASSWORD: password ports: - "8100:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d groundcontrol"] interval: 5s timeout: 5s retries: 5 ground-control: build: context: . dockerfile: Dockerfile args: COMPONENT: groundcontrol/server container_name: ground-control extra_hosts: - "host.docker.internal:host-gateway" environment: DB_HOST: postgres DB_PORT: 5432 DB_DATABASE: groundcontrol DB_USERNAME: postgres DB_PASSWORD: password HARBOR_URL: ${HARBOR_URL:?set HARBOR_URL to the Harbor instance Ground Control manages} HARBOR_USERNAME: ${HARBOR_USERNAME:-admin} HARBOR_PASSWORD: ${HARBOR_PASSWORD:-Harbor12345} # Bootstraps the "admin" user on first start. Must satisfy the password policy. ADMIN_PASSWORD: ${ADMIN_PASSWORD:-} PORT: 8080 # Testing only: skips the Harbor check at startup and uses placeholder robot credentials for SPIFFE ZTR. SKIP_HARBOR_HEALTH_CHECK: ${SKIP_HARBOR_HEALTH_CHECK:-true} SPIFFE_SERVER_ENABLED: "false" ports: - "${GC_HOST_PORT:-8080}:8080" depends_on: postgres: condition: service_healthy # Needs a token from Ground Control, so `docker compose up -d` skips it. # Start it explicitly: TOKEN= docker compose up -d satellite satellite: profiles: ["satellite"] build: context: . dockerfile: Dockerfile args: COMPONENT: satellite container_name: satellite extra_hosts: - "host.docker.internal:host-gateway" environment: - GROUND_CONTROL_URL=http://ground-control:8080 - HARBOR_REGISTRY_URL=${HARBOR_REGISTRY_URL:-${HARBOR_URL}} - TOKEN=${TOKEN:-} - USE_UNSECURE=${USE_UNSECURE:-false} - CONFIG_DIR=/data volumes: - satellite-data:/data depends_on: - ground-control restart: unless-stopped volumes: pgdata: satellite-data: