mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-05-01 05:55:13 +00:00
464aa3b953
Milestone 2 of #132. Updates manage.sh to use docker-compose.yml when present: - start/start --with-staging (copies prod DB + config to staging) - stop [prod|staging|all] - status shows both containers - logs [prod|staging] - promote (backup prod, restart with latest image) Legacy single-container mode preserved as fallback. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
50 lines
1.5 KiB
YAML
50 lines
1.5 KiB
YAML
version: '3.8'
|
|
|
|
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:
|
|
- ${PROD_DATA_DIR:-~/meshcore-data}/config.json:/app/config.json:ro
|
|
- ${PROD_DATA_DIR:-~/meshcore-data}/Caddyfile:/etc/caddy/Caddyfile:ro
|
|
- ${PROD_DATA_DIR:-~/meshcore-data}:/app/data
|
|
- caddy-data-prod:/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
|
|
|
|
volumes:
|
|
caddy-data-prod:
|
|
caddy-data-staging:
|