# PowerSync Service 主配置 (0.2.1 验证部署) # 参考: https://docs.powersync.com/configuration/powersync-service/self-hosted-instances # 注意: !env 是 YAML 整值标签, 只能整个值替换变量, 不能内嵌在 URI 字符串中; # 完整连接串由 docker-compose 以 PS_* 环境变量注入。 replication: connections: - type: postgresql # 源库: 本栈 pg 容器 (0.2.1 独立实例), 复制走 iboard021 账号 uri: !env PS_SOURCE_URI sslmode: disable # bucket storage: 同实例 PG (16 >= 14 允许同库不同 schema, service 自建 powersync schema) storage: type: postgresql uri: !env PS_STORAGE_URI sslmode: disable port: 8080 sync_config: path: /config/sync-config.yaml # 客户端鉴权: app 后端 /api/powersync/token 签发 HS256 JWT (aud=powersync) # oct 密钥 k = base64url(POWERSYNC_JWT_SECRET) client_auth: jwks: keys: - kty: oct k: !env PS_JWT_KEY_B64 alg: HS256 audience: - powersync telemetry: disable_telemetry_sharing: true system: logging: level: info format: text