21 lines
986 B
YAML
21 lines
986 B
YAML
# Example agent deployment, one per machine. The master UI generates this
|
|
# snippet with MASTER_URL, MASTER_KEY and AGENT_TOKEN filled in (Agents -> Add
|
|
# agent); the token is shown once.
|
|
services:
|
|
updater-agent:
|
|
image: gitea.shcizo.se/shcizo/package-updater:latest
|
|
entrypoint: ["/usr/local/bin/updater-agent"]
|
|
restart: unless-stopped
|
|
environment:
|
|
MASTER_URL: wss://10.0.0.5:8090/agent
|
|
MASTER_KEY: sha256:<fingerprint shown in the master UI>
|
|
AGENT_TOKEN: <token shown once when the agent was added>
|
|
UPDATE_TIMEOUT: 5m
|
|
# Optional registry credentials (a config.json written by docker login):
|
|
# DOCKER_CONFIG: /docker-config
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
# - /path/to/stacks:/path/to/stacks # mount each stacks directory at the same path, read-write
|
|
# (also this agent's own stack directory, or it cannot update itself)
|
|
# - /root/.docker/config.json:/docker-config/config.json:ro
|