# 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:-*} 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", "--spider", "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-net driver: bridge