# Local development core: PostgreSQL and Heimdall Central only. # The Agent and optional software have separate Compose files. services: postgresql: image: postgres:17-alpine environment: POSTGRES_DB: ${POSTGRES_DB:-heimdall} POSTGRES_USER: ${POSTGRES_USER:-heimdall} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required} 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 networks: - heimdall-net heimdall: build: context: .. dockerfile: docker/Dockerfile image: heimdall:local environment: DATABASE_URL: ${DATABASE_URL:?DATABASE_URL is required} JWT__KEY: ${JWT__KEY:?JWT__KEY is required} JWT__REFRESHKEY: ${JWT__REFRESHKEY:?JWT__REFRESHKEY is required} JWT__ISSUER: ${JWT__ISSUER:-heimdall} JWT__AUDIENCE: ${JWT__AUDIENCE:-heimdall-api} ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Development} 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__AllowInsecureHttp: ${HEIMDALL_ALLOW_INSECURE_HTTP:-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} ports: - "${WEB_PORT:-5000}:8080" volumes: - heimdall_data:/var/lib/heimdall # Persist the default ./data/storage path as well as /var/lib/heimdall. - heimdall_data:/app/data depends_on: postgresql: condition: service_healthy healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--output-document=/dev/null", "http://localhost:8080/healthz"] interval: 30s timeout: 10s retries: 3 start_period: 60s restart: unless-stopped networks: - heimdall-net volumes: pgdata: heimdall_data: networks: heimdall-net: name: ${HEIMDALL_NETWORK_NAME:-heimdall-net} driver: bridge