46 lines
1022 B
YAML
46 lines
1022 B
YAML
version: '3.2'
|
|
|
|
services:
|
|
agent:
|
|
image: portainer/agent
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- /var/lib/docker/volumes:/var/lib/docker/volumes
|
|
networks:
|
|
- agent_network
|
|
deploy:
|
|
mode: global
|
|
placement:
|
|
constraints: [node.platform.os == linux]
|
|
|
|
portainer:
|
|
image: portainer/portainer
|
|
command: -H tcp://tasks.agent:9001 --tlsskipverify -H unix:///var/run/docker.sock
|
|
ports:
|
|
- target: 8000
|
|
published: 8000
|
|
protocol: tcp
|
|
mode: host
|
|
- target: 9000
|
|
published: 9000
|
|
protocol: tcp
|
|
mode: host
|
|
volumes:
|
|
- portainer_data:/data
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- /var/lib/docker/volumes:/var/lib/docker/volumes
|
|
networks:
|
|
- agent_network
|
|
deploy:
|
|
mode: replicated
|
|
replicas: 1
|
|
placement:
|
|
constraints: [node.role == manager]
|
|
|
|
networks:
|
|
agent_network:
|
|
driver: overlay
|
|
attachable: true
|
|
|
|
volumes:
|
|
portainer_data: |