ansible/roles/stacks/composes/inventory/portainer-agent.yml

27 lines
735 B
YAML

# 2023-09-26
# Stack: portainer_agent
---
portainer_agent:
name: "portainer-agent"
ipv6: true
directories: []
services:
- name: "portainer-agent"
image: "portainer/agent:alpine"
uid: "0"
gid: "0"
privileged: true
restart: "always"
ports:
- { exposed: "${VM_PORTAINER_AGENT}", container: "9001" }
healthcheck: './agent --help || exit 1'
ressources:
memory: "{{ 0.5 if 0.5 <= vm_os_memory_max|float else vm_os_memory_max|float }}G"
volumes:
- { local: '/var/run/docker.sock', container: '/var/run/docker.sock', mode: 'rw' }
- { local: '/var/lib/docker/volumes/', container: '/var/lib/docker/volumes/', mode: 'rw' }