Path: redb/redb.Templates/templates/redb-worker/deploy/docker-compose.postgres.yml Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Templates/templates/redb-worker/deploy/docker-compose.postgres.yml ---- # The worker in its own host with PostgreSQL instead of SQLite. # Before the first run, switch the provider in code (see the comment in RedbWorker.Host/Program.cs): # RedbWorker.Host.csproj: redb.SQLite.Pro -> redb.Postgres.Pro # Program.cs: .UseSqlite(...) -> .UsePostgres(connectionString) # Then from the project folder: docker compose -f deploy/docker-compose.postgres.yml up --build # Put order files into runtime/inbox; receipts arrive in runtime/outbox. services: db: image: postgres:17 environment: POSTGRES_USER: redb POSTGRES_PASSWORD: change_me POSTGRES_DB: redb_app volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U redb -d redb_app"] interval: 5s retries: 10 worker: build: .. environment: ConnectionStrings__Redb: "Host=db;Port=5432;Username=redb;Password=change_me;Database=redb_app;Pooling=true" volumes: # On Linux the folder must be writable by the container's user. - ../runtime:/data depends_on: db: condition: service_healthy volumes: pgdata: