Initial commit

Signed-off-by: Thomas Klaehn <thomas.klaehn@perinet.io>
This commit is contained in:
Thomas Klaehn
2026-02-10 11:47:49 +01:00
commit f496eebe2a
17 changed files with 1835 additions and 0 deletions

40
docker-compose.yml Normal file
View File

@@ -0,0 +1,40 @@
version: '3.8'
services:
zwift-monitor:
build: .
container_name: zwift-monitor
restart: unless-stopped
user: root
environment:
# Required: Zwift credentials (use .env file or set directly)
- ZWIFT_USERNAME=${ZWIFT_USERNAME}
- ZWIFT_PASSWORD=${ZWIFT_PASSWORD}
# Optional: Monitoring configuration
- ZWIFT_POLL_INTERVAL=${ZWIFT_POLL_INTERVAL:-5m}
- ZWIFT_LOG_LEVEL=${ZWIFT_LOG_LEVEL:-info}
# Optional: API configuration
- ZWIFT_RATE_LIMIT=${ZWIFT_RATE_LIMIT:-5}
- ZWIFT_MAX_RETRIES=${ZWIFT_MAX_RETRIES:-3}
# Optional: Timezone (adjust to your timezone)
- TZ=${TZ:-Europe/Berlin}
volumes:
# Persistent storage for FIT files and state
- ./data:/data
# Optional: Mount custom config file
# - ./config.yaml:/app/config.yaml:ro
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
healthcheck:
test: ["CMD", "test", "-f", "/data/zwift-state.json"]
interval: 1m
timeout: 10s
retries: 3
start_period: 30s