Files
Heimdall/docker/docker-compose.prod.yml
T

102 lines
3.2 KiB
YAML
Raw Normal View History

# Production core: PostgreSQL and Heimdall Central only.
# Usage: docker compose --env-file docker/.env -f docker/docker-compose.prod.yml up -d
# Optional software has its own Compose file; see docs/docker-compose.md.
x-logging: &default-logging
driver: json-file
options:
max-size: 10m
max-file: "3"
services:
postgresql:
image: postgres:17-alpine
2026-10-28 06:38:24 +01:00
pull_policy: always
environment:
POSTGRES_DB: ${POSTGRES_DB:-heimdall}
POSTGRES_USER: ${POSTGRES_USER:-heimdall}
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
secrets:
- db_password
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-heimdall}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
logging: *default-logging
networks:
- heimdall-net
heimdall:
image: eltruncho/heimdall:latest
2026-10-28 06:38:24 +01:00
pull_policy: always
labels:
com.centurylinklabs.watchtower.enable: "true"
environment:
DATABASE_URL: ${DATABASE_URL:?DATABASE_URL is required}
JWT__Issuer: ${JWT__ISSUER:-heimdall}
JWT__Audience: ${JWT__AUDIENCE:-heimdall-api}
JWT__KEY: ${JWT__KEY:?JWT__KEY is required}
JWT__REFRESHKEY: ${JWT__REFRESHKEY:?JWT__REFRESHKEY is required}
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Production}
ASPNETCORE_URLS: http://+:8080
Cors__AllowedOrigins: ${Cors__AllowedOrigins:-*}
LiveMedia__WhepUrl: ${HEIMDALL_WHEP_URL:-}
LiveMedia__PublishRtspUrl: ${HEIMDALL_PUBLISH_RTSPS_URL:-}
LiveMedia__AllowInsecureRtsp: ${HEIMDALL_ALLOW_INSECURE_RTSP:-false}
LiveMedia__IceServers__0__Urls__0: ${HEIMDALL_STUN_URL:-}
LiveMedia__Turn__Urls__0: ${HEIMDALL_TURN_URL:-}
LiveMedia__Turn__SharedSecret: ${HEIMDALL_TURN_SHARED_SECRET:-}
Recordings__StorageQuota__MaxBytes: ${RECORDING_STORAGE_QUOTA_MAX_BYTES:-1099511627776}
Sentry__Dsn: ${SENTRY_DSN:-}
Sentry__TracesSampleRate: ${SENTRY_TRACES_SAMPLE_RATE:-0.05}
Sentry__Release: ${SENTRY_RELEASE:-}
ports:
- "${WEB_PORT:-5000}:8080"
volumes:
- heimdall_data:/var/lib/heimdall
# Local storage defaults to ./data/storage under /app; persist it in the same volume.
- heimdall_data:/app/data
depends_on:
postgresql:
condition: service_healthy
healthcheck:
2026-10-28 06:38:24 +01:00
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--output-document=/dev/null", "http://127.0.0.1:8080/healthz"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
restart: unless-stopped
logging: *default-logging
networks:
- heimdall-net
2026-10-28 06:38:24 +01:00
watchtower:
image: nickfedor/watchtower:1.23.2
pull_policy: always
command: ["--cleanup", "--label-enable", "--interval", "86400"]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped
logging: *default-logging
networks:
- heimdall-net
volumes:
pgdata:
heimdall_data:
secrets:
db_password:
file: ./secrets/db_password
networks:
heimdall-net:
name: ${HEIMDALL_NETWORK_NAME:-heimdall-net}
driver: bridge