Skip to main content

Overview

ondoki ships with three Docker Compose files:
FilePurpose
docker-compose.ymlBase development stack
docker-compose.dev.ymlDevelopment overrides (hot-reload)
docker-compose.prod.ymlProduction stack with Caddy, GHCR images
For production, use docker-compose.prod.yml.

Production Setup

Prerequisites

  • Docker and Docker Compose v2+
  • A domain name (for automatic HTTPS via Caddy)
  • At least 2 GB RAM

1. Clone and Configure

git clone https://github.com/myfoxit/ondoki-web.git
cd ondoki-web
cp .env.example .env

2. Set Required Variables

Edit .env with production values:
# Domain for Caddy HTTPS
DOMAIN=app.yourdomain.com

# Security keys (generate fresh values)
JWT_SECRET=$(openssl rand -hex 32)
ONDOKI_ENCRYPTION_KEY=$(python3 -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())")

# Database
POSTGRES_USER=ondoki
POSTGRES_PASSWORD=<strong-random-password>

# Frontend URL
FRONTEND_URL=https://app.yourdomain.com

# CORS
CORS_ORIGINS=https://app.yourdomain.com,ondoki://
CORS_ORIGIN_REGEX=^https://.*\.yourdomain\.com$

# Redis password
REDIS_PASSWORD=<strong-random-password>
See Environment Variables for the full reference.

3. Start the Stack

docker compose -f docker-compose.prod.yml up -d

4. Verify

# Check all services are healthy
docker compose -f docker-compose.prod.yml ps

# Check backend health
curl https://app.yourdomain.com/api/health

Services

The production stack includes:
ServiceImagePurpose
caddycaddy:2-alpineReverse proxy with automatic HTTPS
dbpgvector/pgvector:pg16PostgreSQL with vector search
redisredis:7-alpineCache, pub/sub, task queue
gotenberggotenberg/gotenberg:8PDF generation
backendghcr.io/myfoxit/ondoki-web-api:latestFastAPI backend
media-workerghcr.io/myfoxit/ondoki-web-api:latestCelery worker for video processing
frontendghcr.io/myfoxit/ondoki-web-app:latestReact SPA served via Nginx

Optional Services

Enable PII protection with the privacy profile:
docker compose -f docker-compose.prod.yml --profile privacy up -d
This adds:
  • SendCloak — PII obfuscation proxy
  • Presidio — Microsoft’s NER-based PII detection

Volumes

VolumeContents
db-dataPostgreSQL data
caddy-dataHTTPS certificates
caddy-configCaddy configuration
file-storageUploaded files and recordings
uploadsGeneral file uploads
Back up the db-data volume regularly. It contains all your data. Also back up your .env file — the encryption key is required to decrypt API keys stored in the database.

Networking

All services communicate on the ondoki-network bridge network. In production:
  • Only Caddy exposes ports 80 and 443
  • PostgreSQL is not exposed to the host
  • Redis requires password authentication

Health Checks

ServiceHealth Check
dbpg_isready
redisredis-cli ping
gotenbergHTTP GET on /health
backendHTTP GET on /health (30s start period)

Updating

See Upgrades for the update procedure.

Scaling

The backend is stateless and supports horizontal scaling. WebSocket notifications use Redis pub/sub for multi-server delivery. To run multiple backend instances, use a container orchestrator (Docker Swarm, Kubernetes) and point them at the same PostgreSQL and Redis instances.