Files
weatherstation-datacollector/docker-compose.dev.yml
olaf 5b4340fab2 changed: data-logging configuration to rotate more frequently
fixed: database connection retry interval and storing in local SQLite when DB is down
2025-12-28 07:35:50 +00:00

27 lines
1.0 KiB
YAML

version: '3.8'
services:
data-collector:
# Override command to prevent auto-start in dev environment
command: sleep infinity
# Override volumes for local dev; host workspace is mounted to /workspace.
volumes:
- ./:/workspace
- ./data:/workspace/data
- ./secrets/id_rsa:/workspace/.ssh/id_rsa:ro
- ./secrets/known_hosts:/workspace/.ssh/known_hosts:ro
environment:
# Safe defaults for local dev
- PI_HOST=${PI_HOST:-localhost}
- PI_USER=${PI_USER:-pi}
- SSH_KEY_PATH=/workspace/.ssh/id_rsa
- STALL_WINDOW_SECONDS=${STALL_WINDOW_SECONDS:-300}
- RESTART_COOLDOWN_SECONDS=${RESTART_COOLDOWN_SECONDS:-3600}
# DB override for dev testing; defaults to an invalid host to simulate DB-down
- DB_HOST=${DB_HOST:-invalid-host}
- DB_PORT=${DB_PORT:-3306}
- DB_USER=${DB_USER:-weatherdata}
- DB_PASSWORD=${DB_PASSWORD:-cfCU$swM!HfK82%*}
- DB_NAME=${DB_NAME:-weatherdata}
- DB_CONNECT_TIMEOUT=${DB_CONNECT_TIMEOUT:-5}