Deploy Sovrium with Docker Compose and PostgreSQL
You want the app and its PostgreSQL database to come up together as one stack, with the database wired in by a single DATABASE_URL.
Define the stack
# compose.yaml
services:
db:
image: postgres:17
environment:
POSTGRES_PASSWORD: sovrium
POSTGRES_DB: sovrium
volumes: ['db-data:/var/lib/postgresql/data']
app:
image: ghcr.io/sovrium/sovrium:latest
command: start /app/app.ts
depends_on: [db]
ports: ['3000:3000']
volumes: ['./app.ts:/app/app.ts:ro']
environment:
DATABASE_URL: postgres://postgres:sovrium@db:5432/sovrium
AUTH_SECRET: change-me-to-32-byte-hex
SOVRIUM_ENCRYPTION_KEY: change-me-to-32-byte-hex
BASE_URL: http://localhost:3000
volumes:
db-data:
Run and verify
docker compose up -d
curl -fsS http://localhost:3000/ >/dev/null && echo "up"
Because DATABASE_URL is set, Sovrium runs on Postgres and applies its schema on boot.
Next
- Database Infrastructure — the Postgres engine Sovrium targets.
- Schema Migrations — how the schema evolves on each boot.
- Security Hardening — replace the placeholder secrets before production.
Last updated July 21, 2026
This documentation was written with Claude Fable 5 (Anthropic), so errors or outdated content are possible. Sovrium is in beta — contributions and corrections are welcome.