2026-10-26 05:59:55 +01:00
|
|
|
# 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.
|
2026-07-18 11:30:55 +00:00
|
|
|
|
|
|
|
|
x-logging: &default-logging
|
2026-10-26 05:59:55 +01:00
|
|
|
driver: json-file
|
2026-07-18 11:30:55 +00:00
|
|
|
options:
|
2026-10-26 05:59:55 +01:00
|
|
|
max-size: 10m
|
2026-07-18 11:30:55 +00:00
|
|
|
max-file: "3"
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
postgresql:
|
|
|
|
|
image: postgres:17-alpine
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_DB: ${POSTGRES_DB:-heimdall}
|
|
|
|
|
POSTGRES_USER: ${POSTGRES_USER:-heimdall}
|
2026-08-20 18:13:59 +02:00
|
|
|
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
|
|
|
|
|
secrets:
|
|
|
|
|
- db_password
|
2026-07-18 11:30:55 +00:00
|
|
|
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
|
|
|
|
|
|
2026-07-20 17:22:56 +00:00
|
|
|
heimdall:
|
2026-10-26 08:34:15 +01:00
|
|
|
image: eltruncho/heimdall:latest
|
2026-07-18 11:30:55 +00:00
|
|
|
environment:
|
2026-07-19 20:53:48 +00:00
|
|
|
DATABASE_URL: ${DATABASE_URL:?DATABASE_URL is required}
|
2026-10-20 02:27:03 +02:00
|
|
|
JWT__Issuer: ${JWT__ISSUER:-heimdall}
|
|
|
|
|
JWT__Audience: ${JWT__AUDIENCE:-heimdall-api}
|
2026-10-26 05:59:55 +01:00
|
|
|
JWT__KEY: ${JWT__KEY:?JWT__KEY is required}
|
|
|
|
|
JWT__REFRESHKEY: ${JWT__REFRESHKEY:?JWT__REFRESHKEY is required}
|
2026-07-18 11:30:55 +00:00
|
|
|
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Production}
|
|
|
|
|
ASPNETCORE_URLS: http://+:8080
|
2026-07-20 10:30:01 +00:00
|
|
|
Cors__AllowedOrigins: ${Cors__AllowedOrigins:-*}
|
2026-08-20 18:13:59 +02:00
|
|
|
Sentry__Dsn: ${SENTRY_DSN:-}
|
|
|
|
|
Sentry__TracesSampleRate: ${SENTRY_TRACES_SAMPLE_RATE:-0.05}
|
|
|
|
|
Sentry__Release: ${SENTRY_RELEASE:-}
|
2026-07-18 11:30:55 +00:00
|
|
|
ports:
|
2026-07-20 10:30:01 +00:00
|
|
|
- "${WEB_PORT:-5000}:8080"
|
2026-07-20 14:04:42 +00:00
|
|
|
volumes:
|
|
|
|
|
- heimdall_data:/var/lib/heimdall
|
2026-10-26 07:28:37 +01:00
|
|
|
# Local storage defaults to ./data/storage under /app; persist it in the same volume.
|
|
|
|
|
- heimdall_data:/app/data
|
2026-07-18 11:30:55 +00:00
|
|
|
depends_on:
|
|
|
|
|
postgresql:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/healthz"]
|
|
|
|
|
interval: 30s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
retries: 3
|
|
|
|
|
start_period: 60s
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
logging: *default-logging
|
|
|
|
|
networks:
|
|
|
|
|
- heimdall-net
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
pgdata:
|
2026-07-20 14:04:42 +00:00
|
|
|
heimdall_data:
|
2026-08-20 18:13:59 +02:00
|
|
|
|
|
|
|
|
secrets:
|
|
|
|
|
db_password:
|
|
|
|
|
file: ./secrets/db_password
|
2026-07-18 11:30:55 +00:00
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
heimdall-net:
|
2026-10-26 05:59:55 +01:00
|
|
|
name: heimdall-net
|
2026-07-18 11:30:55 +00:00
|
|
|
driver: bridge
|