CodeStyle, Compose verbesserungen, Docker Healthcheck
This commit is contained in:
@@ -2,27 +2,71 @@ services:
|
||||
watcher:
|
||||
image: git.triggermeelmo.com/watcher/watcher-server:${IMAGE_VERSION:-latest}
|
||||
container_name: watcher
|
||||
|
||||
# Resource Management
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 200M
|
||||
cpus: '0.5'
|
||||
reservations:
|
||||
memory: 100M
|
||||
cpus: '0.25'
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
# Security
|
||||
user: "1000:1000"
|
||||
|
||||
# Health Check
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
# Environment
|
||||
environment:
|
||||
# Timezone
|
||||
- TZ=Europe/Berlin
|
||||
|
||||
# Application Version (wird aus Image-Tag übernommen)
|
||||
- WATCHER_VERSION=${IMAGE_VERSION:-latest}
|
||||
|
||||
# ASP.NET Core
|
||||
- ASPNETCORE_ENVIRONMENT=Production
|
||||
- ASPNETCORE_URLS=http://+:5000
|
||||
|
||||
# Update Check
|
||||
- UPDATE_CHECK_ENABLED=true
|
||||
- UPDATE_CHECK_INTERVAL_HOURS=24
|
||||
- UPDATE_CHECK_REPOSITORY_URL=https://git.triggermeelmo.com/api/v1/repos/Watcher/watcher/releases/latest
|
||||
|
||||
# Data Retention Policy
|
||||
- METRIC_RETENTION_DAYS=30
|
||||
- METRIC_CLEANUP_INTERVAL_HOURS=24
|
||||
- METRIC_CLEANUP_ENABLED=true
|
||||
|
||||
# Aktualisierungsrate Frontend
|
||||
- FRONTEND_REFRESH_INTERVAL_SECONDS=30
|
||||
|
||||
# Ports
|
||||
ports:
|
||||
- "5000:5000"
|
||||
|
||||
# Volumes
|
||||
volumes:
|
||||
- ./data/db:/app/persistence
|
||||
- ./data/dumps:/app/wwwroot/downloads/sqlite
|
||||
- ./data/logs:/app/logs
|
||||
|
||||
# Labels (Traefik Integration)
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.watcher.rule=Host(`watcher.example.com`)"
|
||||
- "traefik.http.routers.watcher.entrypoints=websecure"
|
||||
- "traefik.http.routers.watcher.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.services.watcher.loadbalancer.server.port=5000"
|
||||
- "com.watcher.description=Server Monitoring Application"
|
||||
- "com.watcher.version=${IMAGE_VERSION:-latest}"
|
||||
|
||||
Reference in New Issue
Block a user