Path: redb/redb.Templates/templates/redb-bff/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-bff/deploy/docker-compose.postgres.yml ---- # The backend with PostgreSQL instead of SQLite, and the web server. # Before the first run, switch the provider in code (see the comment in RedbBff.Host/Program.cs): # RedbBff.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 backend: build: context: .. dockerfile: RedbBff.Host/Dockerfile environment: ConnectionStrings__Redb: "Host=db;Port=5432;Username=redb;Password=change_me;Database=redb_app;Pooling=true" Tsak__Contexts__redbbff__Override__Api__ServiceKey: ${BFF_SERVICE_KEY:?BFF_SERVICE_KEY required} depends_on: db: condition: service_healthy web: build: context: .. dockerfile: RedbBff.Web/Dockerfile ports: - "8080:8080" environment: Backend__BaseUrl: "http://backend:5093/" Backend__ServiceKey: ${BFF_SERVICE_KEY:?BFF_SERVICE_KEY required} Web__Users__admin__Password: ${APP_ADMIN_PASSWORD:?APP_ADMIN_PASSWORD required} depends_on: - backend volumes: pgdata: