fix(0.2.1): !env 为 YAML 整值标签 —— URI 由 compose 组装后整值注入 (PS_SOURCE_URI/PS_STORAGE_URI)
This commit is contained in:
@@ -62,9 +62,9 @@ services:
|
||||
- ./powersync/sync-config.yaml:/config/sync-config.yaml:ro
|
||||
environment:
|
||||
POWERSYNC_CONFIG_PATH: /config/service.yaml
|
||||
# service.yaml 内 !env PS_* 引用
|
||||
PS_PG_PASSWORD: ${PG_PASSWORD}
|
||||
PS_STORAGE_PASSWORD: ${PS_STORAGE_PASSWORD}
|
||||
# service.yaml 内 !env PS_* 引用 (整值替换; URI 在此组装)
|
||||
PS_SOURCE_URI: postgresql://iboard021:${PG_PASSWORD}@pg:5432/iboard021?sslmode=disable
|
||||
PS_STORAGE_URI: postgresql://powersync_storage:${PS_STORAGE_PASSWORD}@pg:5432/iboard021?sslmode=disable
|
||||
PS_JWT_KEY_B64: ${POWERSYNC_JWT_KEY_B64:?POWERSYNC_JWT_KEY_B64 missing}
|
||||
ports:
|
||||
- "13002:8080"
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
# PowerSync Service 主配置 (0.2.1 验证部署)
|
||||
# 参考: https://docs.powersync.com/configuration/powersync-service/self-hosted-instances
|
||||
# !env 仅支持 PS_ 前缀变量, 由 docker-compose environment 注入
|
||||
# 注意: !env 是 YAML 整值标签, 只能整个值替换变量, 不能内嵌在 URI 字符串中;
|
||||
# 完整连接串由 docker-compose 以 PS_* 环境变量注入。
|
||||
|
||||
replication:
|
||||
connections:
|
||||
- type: postgresql
|
||||
# 源库: 本栈 pg 容器 (0.2.1 独立实例), 复制走 iboard021 账号
|
||||
uri: postgresql://iboard021:!env PS_PG_PASSWORD@pg:5432/iboard021
|
||||
uri: !env PS_SOURCE_URI
|
||||
sslmode: disable
|
||||
|
||||
# bucket storage: 同实例 PG (16 >= 14 允许同库不同 schema, service 自建 powersync schema)
|
||||
storage:
|
||||
type: postgresql
|
||||
uri: postgresql://powersync_storage:!env PS_STORAGE_PASSWORD@pg:5432/iboard021
|
||||
uri: !env PS_STORAGE_URI
|
||||
sslmode: disable
|
||||
|
||||
port: 8080
|
||||
|
||||
Reference in New Issue
Block a user