chore(docker): fix compose files and update README documentation
- Fix docker-compose.prod.yml: agent image ref (heimdall-central→heimdall-agent) and env var naming (HEIMDALL_* → Agent__*) - Add missing SENTRY_DSN env vars to central, workers, web, and agent services - Add agent_state volume for agent identity persistence - Update README with accurate test counts (34→225), env var reference table, troubleshooting guide, and proper docker documentation - Update docker-compose.yml header and add Agent__StateDirectory/Agent__RegistrationMaxRetries
This commit is contained in:
1 parent
363b43f779
commit
554fd7ffc3
3 files changed
+199
-92
No files matched your search
@@ -78,6 +78,7 @@ services:
|
||||
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Production}
|
||||
ASPNETCORE_URLS: http://+:8080
|
||||
Cors__AllowedOrigins: ${Cors__AllowedOrigins:-https://localhost:5001}
|
||||
SENTRY_DSN: ${SENTRY_DSN}
|
||||
ports:
|
||||
- "${CENTRAL_PORT:-5000}:8080"
|
||||
depends_on:
|
||||
@@ -100,6 +101,7 @@ services:
|
||||
environment:
|
||||
DATABASE_URL: ${DATABASE_URL:-Host=postgresql;Port=5432;Database=heimdall;Username=heimdall;Password=heimdall}
|
||||
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Production}
|
||||
SENTRY_DSN: ${SENTRY_DSN}
|
||||
depends_on:
|
||||
postgresql:
|
||||
condition: service_healthy
|
||||
@@ -132,11 +134,22 @@ services:
|
||||
- heimdall-net
|
||||
|
||||
heimdall-agent:
|
||||
image: eltruncho/heimdall-central:latest
|
||||
image: eltruncho/heimdall-agent:latest
|
||||
environment:
|
||||
HEIMDALL_CENTRAL_URL: ${HEIMDALL_CENTRAL_URL:-http://heimdall-central:8080}
|
||||
HEIMDALL_SITE_TOKEN: ${HEIMDALL_SITE_TOKEN}
|
||||
HEIMDALL_AGENT_NAME: ${HEIMDALL_AGENT_NAME:-agent-01}
|
||||
Agent__CentralUrl: ${HEIMDALL_CENTRAL_URL:-http://heimdall-central:8080}
|
||||
Agent__SiteToken: ${HEIMDALL_SITE_TOKEN}
|
||||
Agent__AgentName: ${HEIMDALL_AGENT_NAME:-agent-01}
|
||||
Agent__HeartbeatIntervalSeconds: ${HEIMDALL_HEARTBEAT_INTERVAL:-30}
|
||||
Agent__StateDirectory: /var/lib/heimdall
|
||||
SENTRY_DSN: ${SENTRY_DSN}
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/healthz"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
volumes:
|
||||
- agent_state:/var/lib/heimdall
|
||||
depends_on:
|
||||
- heimdall-central
|
||||
restart: unless-stopped
|
||||
@@ -149,6 +162,8 @@ volumes:
|
||||
driver: local
|
||||
alarik_storage:
|
||||
driver: local
|
||||
agent_state:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
heimdall-net:
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# ─── Heimdall — Production Docker Compose ────────────────────────
|
||||
# Usage: docker compose up -d
|
||||
# Override for dev: -f docker-compose.override.yml
|
||||
# ─── Heimdall — Development Docker Compose ─────────────────────────
|
||||
# Builds images from local source. For production with pre-built images,
|
||||
# use: docker compose -f docker/docker-compose.prod.yml up -d
|
||||
# For development with hot-reload:
|
||||
# docker compose -f docker/docker-compose.yml -f docker/docker-compose.override.yml up -d
|
||||
|
||||
x-logging: &default-logging
|
||||
driver: "json-file"
|
||||
@@ -75,6 +77,7 @@ services:
|
||||
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Production}
|
||||
ASPNETCORE_URLS: http://+:8080
|
||||
Cors__AllowedOrigins: ${Cors__AllowedOrigins:-https://localhost:5001}
|
||||
SENTRY_DSN: ${SENTRY_DSN}
|
||||
ports:
|
||||
- "${CENTRAL_PORT:-5000}:8080"
|
||||
depends_on:
|
||||
@@ -99,6 +102,7 @@ services:
|
||||
environment:
|
||||
DATABASE_URL: ${DATABASE_URL:-Host=postgresql;Port=5432;Database=heimdall;Username=heimdall;Password=heimdall}
|
||||
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Production}
|
||||
SENTRY_DSN: ${SENTRY_DSN}
|
||||
depends_on:
|
||||
postgresql:
|
||||
condition: service_healthy
|
||||
@@ -140,7 +144,12 @@ services:
|
||||
Agent__CentralUrl: ${HEIMDALL_CENTRAL_URL:-http://heimdall-central:8080}
|
||||
Agent__SiteToken: ${HEIMDALL_SITE_TOKEN}
|
||||
Agent__AgentName: ${HEIMDALL_AGENT_NAME:-agent-01}
|
||||
Agent__HeartbeatIntervalSeconds: 30
|
||||
Agent__HeartbeatIntervalSeconds: ${HEIMDALL_HEARTBEAT_INTERVAL:-30}
|
||||
Agent__StateDirectory: /var/lib/heimdall
|
||||
Agent__RegistrationMaxRetries: ${HEIMDALL_REGISTRATION_RETRIES:-5}
|
||||
SENTRY_DSN: ${SENTRY_DSN}
|
||||
volumes:
|
||||
- agent_state:/var/lib/heimdall
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/healthz"]
|
||||
interval: 30s
|
||||
@@ -159,6 +168,8 @@ volumes:
|
||||
driver: local
|
||||
alarik_storage:
|
||||
driver: local
|
||||
agent_state:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
heimdall-net:
|
||||
|
||||
Reference in new issue
Block a user