mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-03-29 15:29:53 +00:00
Go server is production-ready. Users upgrading via git pull + manage.sh get Go automatically. No flags, no engine selection, no decision needed. - Dockerfile (was Dockerfile.go) — Go multi-stage build - Dockerfile.node — archived Node.js build for rollback - docker-compose staging-go now builds from Dockerfile Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
79 lines
2.4 KiB
YAML
79 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
|
|
args:
|
|
APP_VERSION: ${APP_VERSION:-unknown}
|
|
GIT_COMMIT: ${GIT_COMMIT:-unknown}
|
|
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
|
|
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:
|