# yamllint disable rule:line-length rule:document-start rule:comments # Vendored, unmodified below this header, from wger-project/docker at commit # 77fad3d9fae7180ce1ac132f4d5ed4cc30a8c20e # (2026-08-21), file services/config-powersync/powersync.yaml. # These files describe the schema PowerSync replicates, so they move together # with the wger/server image rather than being fetched independently. # yaml-language-server: $schema=../schema/schema.json # Note that this example uses YAML custom tags for environment variable substitution. # Using `!env [variable name]` will substitute the value of the environment variable named # [variable name]. # # Only environment variables with names starting with `PS_` can be substituted. # # e.g. With the environment variable `export PS_STORAGE_MONGO_URI=mongodb://localhost:27017` # and YAML code: # uri: !env PS_STORAGE_MONGO_URI # The YAML will resolve to: # uri: mongodb://localhost:27017 # # If using VS Code see the `.vscode/settings.json` definitions which define custom tags. # migrations: # # Migrations run automatically by default. # # Setting this to true will skip automatic migrations. # # Migrations can be triggered externally by altering the container `command`. # disable_auto_migration: true # Settings for telemetry reporting # See https://docs.powersync.com/self-hosting/telemetry telemetry: disable_telemetry_sharing: true # Expose prometheus metrics on this port prometheus_port: 9090 # Settings for source database replication replication: # Specify database connection details # Note only 1 connection is currently supported # Multiple connection support is on the roadmap connections: - type: postgresql uri: !env PS_DATABASE_URI # Or use individual params # hostname: db # From the Docker Compose service name # port: 5432 # database: postgres # username: postgres # password: mypassword # SSL settings sslmode: disable # 'verify-full' (default) or 'verify-ca' or 'disable' # 'disable' is OK for local/private networks, not for public networks # Connection settings for sync bucket storage storage: type: postgresql uri: !env PS_STORAGE_PG_URI sslmode: disable # The port which the PowerSync API server will listen on port: !env PS_PORT # Workaround for PSYNC_S2305 bug: PowerSync counts source rows instead of DISTINCT # CTE results. Users with large nutrition logs (>1000 log items) can hit the limit # even though the number of distinct ingredients is well below it. # See https://github.com/powersync-ja/powersync-service/issues/682 # https://github.com/wger-project/flutter/issues/1237 api: parameters: max_parameter_query_results: 10000 # Specify sync rules sync_rules: path: sync_rules.yaml # Client (application end user) authentication settings client_auth: allow_local_jwks: true jwks_uri: !env PS_JWKS_URL # JWKS audience audience: ["powersync"]