auto-sync: 2026-04-19 18:30:01
This commit is contained in:
@@ -129,19 +129,17 @@ services:
|
||||
- fr24-net
|
||||
|
||||
monitoring:
|
||||
image: alpine:3.20
|
||||
build:
|
||||
context: ../monitoring
|
||||
dockerfile: Dockerfile
|
||||
image: fr24-monitoring
|
||||
container_name: fr24-monitoring
|
||||
command: ["sh", "-c", "echo 'monitoring placeholder: disk, db, capture status, alerts'; tail -f /dev/null"]
|
||||
environment:
|
||||
<<: *common-env
|
||||
SERVICE_ROLE: monitoring
|
||||
MONITORING_INTERVAL_SECONDS: ${MONITORING_INTERVAL_SECONDS:-30}
|
||||
ports:
|
||||
- "${MONITORING_PUBLISHED_PORT:-9090}:9090"
|
||||
MONITORING_INTERVAL_SECONDS: ${MONITORING_INTERVAL_SECONDS:-60}
|
||||
volumes:
|
||||
- ../logs/monitoring:/var/log/fr24
|
||||
- ../backup:/backup
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
@@ -152,11 +150,36 @@ services:
|
||||
api:
|
||||
condition: service_started
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "test -f /tmp/monitoring-ready || exit 1"]
|
||||
test: ["CMD-SHELL", "test -f /tmp/monitoring-ready && pgrep -f main.py > /dev/null || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
start_period: 15s
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- fr24-net
|
||||
|
||||
backup:
|
||||
image: postgres:16-alpine
|
||||
container_name: fr24-backup
|
||||
environment:
|
||||
PGPASSWORD: ${POSTGRES_PASSWORD:-change-me}
|
||||
PGHOST: ${POSTGRES_HOST:-postgres}
|
||||
PGUSER: ${POSTGRES_USER:-fr24}
|
||||
PGDATABASE: ${POSTGRES_DB:-fr24}
|
||||
TZ: ${TZ:-UTC}
|
||||
volumes:
|
||||
- ../backup:/backup
|
||||
- ../backup/backup.sh:/usr/local/bin/backup.sh:ro
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
command: >
|
||||
sh -c 'echo "[backup] service started, interval=6h" &&
|
||||
while true; do
|
||||
/usr/local/bin/backup.sh;
|
||||
sleep 21600;
|
||||
done'
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- fr24-net
|
||||
|
||||
Reference in New Issue
Block a user