You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Secret Manager must contain the secret named by `LONGPORT_SECRET_NAME` (default: `longport_token`), where the **latest version = active access token**. The app refreshes it when expiry is within 30 days.
92
92
93
+
Recommended shared runtime secrets in the `longbridgequant` project:
94
+
95
+
-`longbridge-telegram-token`
96
+
-`longport-app-key`
97
+
-`longport-app-secret`
98
+
-`longport_token_hk`
99
+
-`longport_token_sg`
100
+
93
101
### Multi-deployment isolation (HK/SG, etc.)
94
102
95
103
Deploy the same codebase as multiple Cloud Run services (e.g. `HK` and `SG`) by setting different values per service:
- Secrets: optional fallback only `LONGPORT_APP_KEY`, `LONGPORT_APP_SECRET`
125
136
126
137
On every push to `main`, the workflow updates both Cloud Run services with the shared and per-environment values above, and removes `TELEGRAM_CHAT_ID` from each Cloud Run service.
127
138
@@ -130,7 +141,7 @@ Important:
130
141
- Put `GCP_SA_KEY` in **repository secrets**, not only under a single Environment. Both `longbridge-hk` and `longbridge-sg` jobs need it.
131
142
-`CLOUD_RUN_REGION` should be set on each GitHub Environment, not as one shared repository variable. This lets `HK` and `SG` live in different Cloud Run regions.
132
143
- The workflow only becomes strict when `ENABLE_GITHUB_ENV_SYNC=true`. If this variable is unset, the sync job is skipped and the old Google Cloud Trigger-only setup keeps working. Once you set it to `true`, missing env-sync values become a hard failure so you do not get a false green deployment.
133
-
- Here "shared" only means **shared inside this repository** between the `HK` and `SG` Cloud Run services. `GCP_SA_KEY`, `TELEGRAM_TOKEN`, and the LongPort secrets remain repository- or environment-specific; they are not meant to be a global secret set reused by unrelated quant repos.
144
+
- Here "shared" only means **shared inside this repository** between the `HK` and `SG` Cloud Run services. `GCP_SA_KEY` remains repository-specific. The Telegram token and LongPort app credentials should live in Secret Manager and be referenced by the shared secret-name variables above; they are not meant to be a global secret set reused by unrelated quant repos.
134
145
- If you want one cross-project shared layer across multiple quant repos, keep it small: `GLOBAL_TELEGRAM_CHAT_ID` and `NOTIFY_LANG` are reasonable; account credentials and deployment keys are not.
0 commit comments