53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
---
|
|
version: "3.3"
|
|
|
|
services:
|
|
agent:
|
|
image: portainer/agent
|
|
restart: always
|
|
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
|
|
restart: "always"
|
|
command: -H tcp://tasks.agent:9001 --tlsskipverify
|
|
ports:
|
|
- "9000:9000"
|
|
- "8000:8000"
|
|
volumes:
|
|
- portainer_data:/data
|
|
networks:
|
|
- agent_network
|
|
- proxy
|
|
deploy:
|
|
mode: replicated
|
|
replicas: 1
|
|
placement:
|
|
constraints:
|
|
- node.role == manager
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.services.portainer.loadbalancer.server.port=9000"
|
|
- "traefik.http.routers.portainer.rule=Host(`portainer.swarm.autonomic.zone`)"
|
|
- "traefik.http.routers.portainer.entrypoints=web-secure"
|
|
- "traefik.http.routers.portainer.tls.certresolver=staging"
|
|
|
|
networks:
|
|
agent_network:
|
|
driver: overlay
|
|
attachable: true
|
|
proxy:
|
|
external: true
|
|
|
|
volumes:
|
|
portainer_data:
|