All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 24s
Sungrow's OAuth server keeps only one active token session per (app, account), not per plant -- with Kallangur and McDowall each managing their own independent token against the same account, whichever one refreshed last was silently invalidating the other's refresh token. Both instances now share one token file (a common bind-mounted volume) instead of each holding their own. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
34 lines
1.8 KiB
YAML
34 lines
1.8 KiB
YAML
services:
|
|
power-compare:
|
|
image: git.plexultra.com/dlawler489/power-compare:main
|
|
ports:
|
|
- "8000:8000"
|
|
env_file:
|
|
# `docker compose` here runs *inside* the stack manager's own
|
|
# container (Docker-outside-of-Docker via the mounted host socket),
|
|
# so this path is resolved against ITS filesystem, not the host's --
|
|
# it must live under the stack manager's own data mount, in a
|
|
# directory outside the git checkout that gets wiped/re-cloned each
|
|
# deploy. On this host that's /Users/davidlawler/docker/dockhand,
|
|
# bind-mounted into the stack manager container as /app/data.
|
|
- /app/data/power-compare-persistent/.env
|
|
environment:
|
|
- DB_PATH=/data/power_compare.db
|
|
# Shared with the McDowall 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 paths, by contrast, are resolved by the real
|
|
# Docker daemon against the actual host filesystem (the daemon isn't
|
|
# inside the stack manager's container) -- so this one stays a real
|
|
# host path, not an /app/data/... one.
|
|
- /Users/davidlawler/docker/power-compare-data/data:/data
|
|
# Same host path as the McDowall 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
|