mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-03-30 19:25:52 +00:00
- Change staging-go HTTP port from 81 to 82 (via STAGING_GO_HTTP_PORT) to avoid conflict with CI's Node.js staging on port 81 - Change staging-go MQTT port from 1884 to 1885 (via STAGING_GO_MQTT_PORT) to avoid conflict with Node.js staging MQTT on port 1884 - Add MQTT_BROKER=mqtt://localhost:1883 env var so Go ingestor connects to its own internal mosquitto instead of unreachable prod external IP Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
77 lines
2.4 KiB
YAML
77 lines
2.4 KiB
YAML
# Volume paths unified with manage.sh — see manage.sh lines 9-12, 56-68, 98-113
|
|
# Override defaults via .env or environment variables.
|
|
|
|
services:
|
|
prod:
|
|
image: meshcore-analyzer:latest
|
|
container_name: meshcore-prod
|
|
restart: unless-stopped
|
|
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:
|
|
image: meshcore-analyzer:latest
|
|
container_name: meshcore-staging
|
|
restart: unless-stopped
|
|
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.go
|
|
image: meshcore-go:latest
|
|
container_name: meshcore-staging-go
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${STAGING_GO_HTTP_PORT:-82}:80"
|
|
- "${STAGING_GO_MQTT_PORT:-1885}:1883"
|
|
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
|
|
- MQTT_BROKER=mqtt://localhost:1883
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/stats"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
profiles:
|
|
- staging-go
|
|
|
|
volumes:
|
|
caddy-data:
|
|
caddy-data-staging:
|
|
caddy-data-staging-go:
|