power-compare-mcdowall/docker-compose.yml
dlawler489 704b1e6d01 Mount shared OAuth token volume for cross-instance token sharing
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-13 08:05:45 +10:00

31 lines
1.6 KiB
YAML

services:
power-compare-mcdowall:
image: git.plexultra.com/dlawler489/power-compare:main
ports:
- "44597:8000"
env_file:
# See the power-compare repo's docker-compose.yml for why this is an
# /app/data/... path rather than a real host path: the stack manager
# runs `docker compose` inside its own container, so paths here
# resolve against ITS filesystem (mounted from
# /Users/davidlawler/docker/dockhand on the host), not the real host's.
- /app/data/power-compare-mcdowall-persistent/.env
environment:
- DB_PATH=/data/power_compare.db
# Shared with the Kallangur (power-compare) stack's identical setting
# via the volume below -- both instances authenticate against the
# same iSolarCloud account, and Sungrow's OAuth server only keeps one
# active token session per (app, account), so each instance
# refreshing its own copy independently was silently invalidating
# the other's. Pointing both at the same bind-mounted file makes
# them share one session.
- ISOLARCLOUD_SHARED_TOKEN_PATH=/shared-oauth/isolarcloud_oauth.json
volumes:
# Bind-mount SOURCE, by contrast, is resolved by the real Docker
# daemon against the actual host filesystem -- a real host path.
- /Users/davidlawler/docker/power-compare-mcdowall-data/data:/data
# Same host path as the power-compare (Kallangur) stack -- this MUST
# stay identical across both compose files, since the point is for
# both containers to bind-mount the literal same file.
- /Users/davidlawler/docker/power-compare-shared-oauth:/shared-oauth
restart: unless-stopped