Files
Heimdall/docker/docker-compose.prod.yml
T
Arnaud Dartois d774d28f2a
Heimdall Gitea / Detect CI scope (pull_request) Successful in 5s
Heimdall Gitea / Build and scan server image (pull_request) Canceled after 0s
Heimdall Gitea / Build and scan agent image (pull_request) Canceled after 0s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Canceled after 0s
Heimdall Gitea / Publish versioned release (pull_request) Canceled after 0s
Heimdall Gitea / Build and tests (pull_request) Canceled after 7m33s
Heimdall Gitea / CI policy (pull_request) Failing after 2s
refactor(settings): manage integrations through Central UI
2026-10-26 06:26:00 +01:00

81 lines
2.3 KiB
YAML

# 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
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: ${SERVER_IMAGE_REFERENCE:?Set SERVER_IMAGE_REFERENCE from docker/server-image.json}
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:-*}
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
- dataprotection_keys:/root/.aspnet/DataProtection-Keys
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:
heimdall_data:
dataprotection_keys:
secrets:
db_password:
file: ./secrets/db_password
networks:
heimdall-net:
name: heimdall-net
driver: bridge