feat: add harborforge-monitor service to docker-compose
Runs the monitor container with network_mode: host and /:/host:ro bind mount so gopsutil reads host-level telemetry. Backend URL, identifier, and API key are sourced from .env via variable interpolation (no secrets in compose).
This commit is contained in:
@@ -80,14 +80,6 @@ services:
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
wizard_init:
|
||||
image: busybox:1.36
|
||||
restart: "no"
|
||||
user: "0:0"
|
||||
volumes:
|
||||
- wizard_config:/config
|
||||
command: ["sh", "-c", "chown -R 65532:65532 /config"]
|
||||
|
||||
wizard:
|
||||
image: git.hangman-lab.top/nav/abstract-wizard:latest
|
||||
ports:
|
||||
@@ -99,9 +91,6 @@ services:
|
||||
LISTEN_ADDR: "0.0.0.0:8080"
|
||||
MAX_BACKUPS: "5"
|
||||
CORS_ORIGINS: ${HF_FRONTEND_HOST}
|
||||
depends_on:
|
||||
wizard_init:
|
||||
condition: service_completed_successfully
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
@@ -118,6 +107,21 @@ services:
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
harborforge-monitor:
|
||||
image: git.hangman-lab.top/zhi/harborforge-monitor:latest
|
||||
container_name: harborforge-monitor
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
HF_MONITER_BACKEND_URL: ${HF_MONITOR_BACKEND_URL:-https://hf.hangman-lab.top}
|
||||
HF_MONITER_IDENTIFIER: ${HF_MONITOR_IDENTIFIER}
|
||||
HF_MONITER_API_KEY: ${HF_MONITOR_API_KEY}
|
||||
HF_MONITER_REPORT_INTERVAL: "30"
|
||||
HF_MONITER_LOG_LEVEL: info
|
||||
HF_MONITER_ROOTFS: /host
|
||||
volumes:
|
||||
- /:/host:ro
|
||||
network_mode: host
|
||||
|
||||
networks:
|
||||
app-network:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user