Files
Heimdall/docker/docker-compose.agent.yml
T

51 lines
1.8 KiB
YAML
Raw Normal View History

# Standalone production Agent. Copy this file and the release public key to the
# camera host, or use the digest-pinned Compose supplied by the Central UI.
# Usage: docker compose --env-file .env -f docker-compose.agent.yml up -d
services:
heimdall-agent:
image: ${AGENT_IMAGE_REFERENCE:?Set AGENT_IMAGE_REFERENCE from the Central image manifest}
restart: unless-stopped
user: "1654:1654"
network_mode: host
environment:
ASPNETCORE_URLS: http://127.0.0.1:8081
Agent__CentralUrl: ${HEIMDALL_CENTRAL_URL:?HEIMDALL_CENTRAL_URL is required}
Agent__SiteToken: ${HEIMDALL_SITE_TOKEN:?HEIMDALL_SITE_TOKEN is required}
Agent__AgentName: ${HEIMDALL_AGENT_NAME:-agent-01}
Agent__HeartbeatIntervalSeconds: ${HEIMDALL_HEARTBEAT_INTERVAL:-30}
Agent__StateDirectory: /var/lib/heimdall
Agent__UpdatePublicKeyPath: /run/secrets/agent-release-public.pem
volumes:
- agent_state:/var/lib/heimdall
- type: bind
source: ./secrets/agent-release-public.pem
target: /run/secrets/agent-release-public.pem
read_only: true
bind:
create_host_path: false
depends_on:
agent-state-init:
condition: service_completed_successfully
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:8081/healthz"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
logging:
driver: json-file
options:
max-size: 10m
max-file: "3"
agent-state-init:
image: ${AGENT_IMAGE_REFERENCE:?Set AGENT_IMAGE_REFERENCE from the Central image manifest}
user: "0:0"
entrypoint: ["chown", "-R", "1654:1654", "/state"]
volumes:
- agent_state:/state
restart: "no"
volumes:
agent_state: