# All container config lives here. manage.sh is just a wrapper around docker compose. # Override defaults via .env or environment variables. # CRITICAL: All data mounts use bind mounts (~/path), NOT named volumes. # This ensures the DB and theme are visible on the host filesystem for backup. services: prod: build: . image: corescope:latest container_name: corescope-prod restart: unless-stopped extra_hosts: - "host.docker.internal:host-gateway" ports: - "${PROD_HTTP_PORT:-80}:${PROD_HTTP_PORT:-80}" - "${PROD_HTTPS_PORT:-443}:${PROD_HTTPS_PORT:-443}" - "${PROD_MQTT_PORT:-1883}:1883" volumes: - ./config.json:/app/config.json:ro - ./caddy-config/Caddyfile:/etc/caddy/Caddyfile:ro - ${PROD_DATA_DIR:-~/meshcore-data}:/app/data - caddy-data:/data/caddy environment: - NODE_ENV=production healthcheck: test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/stats"] interval: 30s timeout: 5s retries: 3 staging: build: . image: corescope:latest container_name: corescope-staging restart: unless-stopped extra_hosts: - "host.docker.internal:host-gateway" ports: - "${STAGING_HTTP_PORT:-81}:${STAGING_HTTP_PORT:-81}" - "${STAGING_MQTT_PORT:-1884}:1883" volumes: - ${STAGING_DATA_DIR:-~/meshcore-staging-data}/config.json:/app/config.json:ro - ${STAGING_DATA_DIR:-~/meshcore-staging-data}/Caddyfile:/etc/caddy/Caddyfile:ro - ${STAGING_DATA_DIR:-~/meshcore-staging-data}:/app/data - caddy-data-staging:/data/caddy environment: - NODE_ENV=staging healthcheck: test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/stats"] interval: 30s timeout: 5s retries: 3 profiles: - staging staging-go: build: context: . dockerfile: Dockerfile args: APP_VERSION: ${APP_VERSION:-unknown} GIT_COMMIT: ${GIT_COMMIT:-unknown} image: corescope-go:latest container_name: corescope-staging-go restart: unless-stopped extra_hosts: - "host.docker.internal:host-gateway" ports: - "${STAGING_GO_HTTP_PORT:-82}:80" - "${STAGING_GO_MQTT_PORT:-1885}:1883" - "6060:6060" # pprof server - "6061:6061" # pprof ingestor volumes: - ${STAGING_DATA_DIR:-~/meshcore-staging-data}/config.json:/app/config.json:ro - ${STAGING_DATA_DIR:-~/meshcore-staging-data}:/app/data - caddy-data-staging-go:/data/caddy environment: - NODE_ENV=staging - ENABLE_PPROF=true healthcheck: test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/stats"] interval: 30s timeout: 5s retries: 3 profiles: - staging-go volumes: # Named volumes for Caddy TLS certificates (not user data — managed by Caddy internally) caddy-data: caddy-data-staging: caddy-data-staging-go: