The template pointed PS_DATA_SOURCE_URI at a placeholder connection
string (postgresql://user:password@host:5432/db), so the PowerSync
service could never connect and crash-looped, leaving the domain
returning Traefik 404s.
Changes:
- Add a bundled Postgres 17 service with wal_level=logical, a
healthcheck, and a persistent volume; powersync waits for it to be
healthy before starting.
- Replace the base64-encoded config env var with a readable
powersync.yaml mounted via [[config.mounts]]. Replication reads from
the powersync database and bucket storage uses a separate
powersync_storage database (Postgres storage requires a database
distinct from the replication source).
- Add an init SQL mount that creates the storage database, a demo
"lists" table synced by the default sync rules, and the powersync
publication required for logical replication.
- Replace the unsupported sync_config block with standard sync_rules,
and add an HS256 dev key so client auth works out of the box.
- Remove host port mapping (Traefik routes to the container port) and
point the template domain at /probes/liveness since PowerSync has no
route on "/".
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>