39
docker-compose.yml
Normal file
39
docker-compose.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
zwift-monitor:
|
||||
build: .
|
||||
container_name: zwift-monitor
|
||||
restart: unless-stopped
|
||||
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
|
||||
Reference in New Issue
Block a user