added docker compose file

This commit is contained in:
2025-10-29 14:24:26 +01:00
parent a8ccb0521a
commit bf90d3ceb9
7 changed files with 1884 additions and 21 deletions

View File

@@ -1,23 +1,20 @@
watcher-agent:
image: git.triggermeelmo.com/donpat1to/watcher-agent:development
container_name: watcher-agent
restart: always
privileged: true # Grants full hardware access (use with caution)
networks:
watcher-network:
driver: bridge
services:
watcher:
image: git.triggermeelmo.com/watcher/watcher-server:v0.1.11
container_name: watcher
deploy:
resources:
limits:
memory: 200M
restart: unless-stopped
env_file: .env
pid: "host"
ports:
- "5000:5000"
volumes:
# Mount critical system paths for hardware monitoring
- /sys:/sys:ro # CPU/GPU temps, sensors
- /proc:/proc # Process/CPU stats
- /dev:/dev:ro # Disk/GPU device access
- /var/run/docker.sock:/var/run/docker.sock # Docker API access
- /:/root:ro # Access to for df-command
# Application volumes
- ./config:/app/config:ro
- ./logs:/app/logs
network_mode: host # Uses host network (for correct IP/interface detection)
healthcheck:
test: ["CMD", "/usr/local/bin/WatcherAgent", "healthcheck"]
interval: 30s
timeout: 3s
retries: 3
- ./watcher-volumes/data:/app/persistence
- ./watcher-volumes/dumps:/app/wwwroot/downloads/sqlite
- ./watcher-volumes/logs:/app/logs