Path: redb/redb.Templates/templates/redb-app/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-app/deploy/docker-compose.postgres.yml ---- # The API with PostgreSQL instead of SQLite, and the client behind nginx. # Before the first run, switch the provider in code (see the comment in RedbApp.Host/Program.cs): # RedbApp.Host.csproj: redb.SQLite.Pro -> redb.Postgres.Pro # Program.cs: .UseSqlite(...) -> .UsePostgres(connectionString) # Then from the project folder (deploy/.env as for docker-compose.yml): # docker compose -f deploy/docker-compose.postgres.yml up --build # Then open http://localhost:8080. 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 api: build: context: .. dockerfile: RedbApp.Host/Dockerfile environment: ConnectionStrings__Redb: "Host=db;Port=5432;Username=redb;Password=change_me;Database=redb_app;Pooling=true" Tsak__Contexts__redbapp__Override__Auth__SigningKey: ${APP_SIGNING_KEY:?APP_SIGNING_KEY required} Tsak__Contexts__redbapp__Override__Auth__Users__admin__Password: ${APP_ADMIN_PASSWORD:?APP_ADMIN_PASSWORD required} depends_on: db: condition: service_healthy web: build: context: .. dockerfile: RedbApp.Web/Dockerfile ports: - "8080:80" depends_on: - api volumes: pgdata: