From 704b1e6d01b0f7d849c82ca7062afb10f6b70748 Mon Sep 17 00:00:00 2001 From: dlawler489 Date: Sun, 13 Sep 2026 08:05:45 +1000 Subject: [PATCH] Mount shared OAuth token volume for cross-instance token sharing Co-Authored-By: Claude Sonnet 5 --- docker-compose.yaml | 12 ++++++++++++ docker-compose.yml | 12 ++++++++++++ 2 files changed, 24 insertions(+) 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