feat: add harborforge-monitor service to git-kc compose

Same monitor setup as T1: network_mode host, host FS bind-mounted
at /host, env vars sourced from .env.
This commit is contained in:
2026-04-16 07:53:33 +00:00
parent 93bb867c3f
commit 3eb8726df7

View File

@@ -59,7 +59,7 @@ services:
- /home/git:/home/git - /home/git:/home/git
- ./gitea/app.ini:/etc/gitea/app.ini:ro - ./gitea/app.ini:/etc/gitea/app.ini:ro
healthcheck: healthcheck:
test: ["CMD-SHELL", "wget -q -O /dev/null http://localhost:3000/ || exit 1"] test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1:3000/ || exit 1"]
interval: 15s interval: 15s
timeout: 5s timeout: 5s
retries: 10 retries: 10
@@ -98,7 +98,7 @@ services:
volumes: volumes:
- ./keycloak/import:/opt/keycloak/data/import:ro - ./keycloak/import:/opt/keycloak/data/import:ro
healthcheck: healthcheck:
test: ["CMD-SHELL", "bash -c 'exec 3<>/dev/tcp/localhost/8080' && exit 0 || exit 1"] test: ["CMD-SHELL", "bash -c 'exec 3<>/dev/tcp/127.0.0.1/8080' && exit 0 || exit 1"]
interval: 15s interval: 15s
timeout: 5s timeout: 5s
retries: 20 retries: 20
@@ -106,6 +106,21 @@ services:
networks: networks:
- git-kc-net - git-kc-net
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: networks:
git-kc-net: git-kc-net:
name: ${DOCKER_NETWORK_NAME} name: ${DOCKER_NETWORK_NAME}