Files
TypstDrive/docker-compose.yml
2026-05-14 18:40:27 -04:00

48 lines
1.6 KiB
YAML

services:
app:
build: .
ports:
- "3000:3000"
environment:
# --- Required ---
# SQLite (default, single-volume, no extra container):
- DATABASE_URL=sqlite:///data/typstdrive.db?mode=rwc
- DB_TYPE=sqlite
# PostgreSQL alternative (uncomment and set DB_TYPE=postgres):
# - DATABASE_URL=postgres://postgres:password@db:5432/typstdrive
# - DB_TYPE=postgres
# --- Optional ---
# Server listen port (default: 3000, also update the ports mapping above)
# - PORT=3000
# Path to compiled frontend assets (default: /app/build)
# - STATIC_DIR=/app/build
# 64+ byte secret for signing session cookies.
# Without this, sessions are cleared on every container restart.
# Generate one with: openssl rand -hex 64
# - COOKIE_SECRET=your-64-plus-byte-secret-here
# Set to "false" to disable public registration (admin panel can still create users)
- ALLOW_REGISTRATION=false
# Log verbosity (default: server=debug,tower_http=debug)
# - RUST_LOG=info
volumes:
- appdata:/data
# Uncomment the db service below when using PostgreSQL (DB_TYPE=postgres).
# Also switch the volume mount in the app service from appdata:/data
# to a separate volume, since PostgreSQL manages its own data directory.
# db:
# image: postgres:16-alpine
# environment:
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: password
# POSTGRES_DB: typstdrive
# ports:
# - "5433:5432"
# volumes:
# - pgdata:/var/lib/postgresql/data
volumes:
appdata:
# pgdata: # Uncomment when using PostgreSQL