44 lines
931 B
YAML
44 lines
931 B
YAML
version: '3.2'
|
|
services:
|
|
agent:
|
|
image: portainer/agent:2.17.1
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- /var/lib/docker/volumes:/var/lib/docker/volumes
|
|
- /var/lib/rexray/volumes:/var/lib/rexray/volumes
|
|
networks:
|
|
- agent
|
|
deploy:
|
|
mode: global
|
|
placement:
|
|
constraints: [node.platform.os == linux]
|
|
resources:
|
|
limits:
|
|
memory: 500M
|
|
main:
|
|
image: portainer/portainer-ce:2.17.1
|
|
command: -H tcp://tasks.agent:9001 --tlsskipverify
|
|
ports:
|
|
- "80:9000"
|
|
- "8000:8000"
|
|
volumes:
|
|
- data:/data
|
|
networks:
|
|
- agent
|
|
deploy:
|
|
mode: replicated
|
|
replicas: 1
|
|
placement:
|
|
constraints: [node.role == manager]
|
|
resources:
|
|
limits:
|
|
memory: 2G
|
|
networks:
|
|
agent:
|
|
driver: overlay
|
|
attachable: true
|
|
volumes:
|
|
data:
|
|
driver: rexray
|
|
driver_opts:
|
|
size: 4 |