Security: Always use HTTPS in production. Terminate TLS at a reverse proxy (nginx, ALB, Caddy) in front of the Vault service. See SECURITY.md for the full production hardening checklist.
This project is ready to run as a Dockerized service.
Initial release (0.1.0) is assumed already shipped. Use 0.1.1+ for subsequent tags.
Server releases publish Docker images to GHCR via: release-by-tag.yml
Image name format:
ghcr.io/<github-owner-lowercase>/oauth-vault:<version>ghcr.io/<github-owner-lowercase>/oauth-vault:latest
Release trigger:
- Push tag:
server/vX.Y.Z
You must set:
OAUTH_VAULT_DATABASE_URLOAUTH_VAULT_ENCRYPTION_KEYSOAUTH_VAULT_API_KEYS(or JWT-mode variables if using JWT auth)OAUTH_VAULT_CALLBACK_BASE_URLOAUTH_VAULT_CALLBACK_PATH
Recommended:
OAUTH_VAULT_AUTH_MODE=jwtfor productionOAUTH_VAULT_REFRESH_POLL_SECONDSOAUTH_VAULT_REFRESH_LEAD_SECONDS
Vault expects schema to exist when OAUTH_VAULT_AUTO_CREATE_SCHEMA=false (default).
Use one of:
-
New Postgres instance initialized with:
migrations/001_init.sql -
Existing Postgres: run migration SQL once before starting Vault.
The image now includes migration files at:
/app/migrations/001_init.sql
docker run -d --name oauth-vault \
-p 8090:8090 \
-e OAUTH_VAULT_DATABASE_URL='postgresql+asyncpg://postgres:postgres@db:5432/oauth_vault' \
-e OAUTH_VAULT_ENCRYPTION_KEYS='REPLACE_WITH_FERNET_KEY' \
-e OAUTH_VAULT_API_KEYS='REPLACE_WITH_STRONG_KEY' \
-e OAUTH_VAULT_CALLBACK_BASE_URL='https://vault.example.com' \
-e OAUTH_VAULT_CALLBACK_PATH='/v1/oauth/callback' \
ghcr.io/<owner>/oauth-vault:<version>Health check:
curl -fsS http://localhost:8090/healthFor first-time local/hosted setup, this repo's docker-compose.yml already wires:
- Postgres
- Vault service
- Automatic initial schema load via
migrations/001_init.sql
Start:
docker compose up -d postgres oauth-vaultFrom this repo:
make release-server VERSION=0.1.1
make release-server-push VERSION=0.1.1This creates and pushes server/v0.1.1, which triggers GHCR publish.