diff --git a/docker-compose.yaml b/docker-compose.yaml index ae1e62c..e2e749a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -12,8 +12,20 @@ services: - /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 diff --git a/docker-compose.yml b/docker-compose.yml index ae1e62c..e2e749a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,8 +12,20 @@ services: - /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