50 lines
1.1 KiB
Django/Jinja
50 lines
1.1 KiB
Django/Jinja
# vim: ft=yaml
|
|
version: '3'
|
|
|
|
services:
|
|
app:
|
|
image: 'portainer/portainer-ce:2.11.0-alpine'
|
|
command: '-H tcp://tasks.agent:9001 --tlsskipverify'
|
|
|
|
deploy:
|
|
mode: replicated
|
|
replicas: 1
|
|
placement:
|
|
constraints:
|
|
- node.role == manager
|
|
labels:
|
|
- 'traefik.enable=true'
|
|
- 'traefik.http.routers.portainer.rule=Host(`{{ portainer_domain }}`)'
|
|
- 'traefik.http.routers.portainer.service=portainer'
|
|
- 'traefik.http.services.portainer.loadbalancer.server.port=9000'
|
|
- 'traefik.http.routers.portainer.tls=true'
|
|
- 'traefik.http.routers.portainer.tls.certresolver=letsEncrypt'
|
|
|
|
networks:
|
|
- default
|
|
- public
|
|
volumes:
|
|
- 'data:/data'
|
|
ports:
|
|
- '8000:8000'
|
|
|
|
agent:
|
|
image: 'portainer/agent:2.9.3-alpine'
|
|
|
|
deploy:
|
|
mode: global
|
|
placement:
|
|
constraints:
|
|
- node.platform.os == linux
|
|
|
|
volumes:
|
|
- '/var/run/docker.sock:/var/run/docker.sock'
|
|
- '/var/lib/docker/volumes:/var/lib/docker/volumes'
|
|
|
|
networks:
|
|
public:
|
|
external: true
|
|
|
|
volumes:
|
|
data:
|