Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (56 loc) · 2.23 KB
/
Copy pathdocker-compose.yml
File metadata and controls
67 lines (56 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: '3.8'
services:
pypowerwall-server:
build: .
container_name: pypowerwall-server
ports:
- "8675:8675"
environment:
# Single gateway mode - TEDAPI only (read-only)
- PW_HOST=192.168.91.1
- PW_GW_PWD=your-gateway-password
# Optional: Add cloud auth for control operations
# First run: python3 -m pypowerwall setup (generates auth files)
# - PW_EMAIL=your-tesla-account@email.com
# - PW_AUTH_PATH=/auth
- PW_TIMEZONE=America/Los_Angeles
# Or multi-gateway mode (uncomment and edit):
# - PW_GATEWAYS=[{"id":"home","name":"Home","host":"192.168.91.1","gw_pwd":"your_gateway_password","email":"tesla@email.com","authpath":"/auth"}]
# CORS settings
- CORS_ORIGINS=["*"]
# Reverse proxy sub-path (optional) - uncomment if serving under a prefix
# - PROXY_BASE_URL=/pypowerwall
# MQTT (optional) - uncomment and set MQTT_HOST to enable
# - MQTT_HOST=192.168.1.100
# - MQTT_PORT=1883
# - MQTT_USERNAME=mqttuser
# - MQTT_PASSWORD=mqttpassword
# - MQTT_HA_DISCOVERY=true # auto-configure Home Assistant sensors
# - MQTT_TOPIC_PREFIX=pypowerwall
# - MQTT_TLS=false
# Control features (optional) - Uncomment to enable:
# - PW_CONTROL_SECRET=your-secure-random-token-here
# Time-series daily energy stats (optional) - SQLite store lives at
# /data/timeseries.db by default; mount the volume to keep history:
# - PW_TIMESERIES_RETENTION=24h # raw sample window; -1 disables
# - PW_TIMESERIES_DAILY_RETENTION=0 # daily kWh rows; 0 = unlimited
volumes:
- pws-data:/data
# Health check - verifies the server process is running and responding.
# /health always returns HTTP 200 regardless of gateway connectivity,
# making it safe for process-level liveness checking. wget is included
# in the image for this purpose.
healthcheck:
test: wget --spider -q http://localhost:8675/health || exit 1
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
restart: unless-stopped
networks:
- pypowerwall
networks:
pypowerwall:
driver: bridge
volumes:
pws-data: