-
Notifications
You must be signed in to change notification settings - Fork 3
/
portainer.yml
54 lines (51 loc) · 1.51 KB
/
portainer.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
version: "3.7"
services:
agent:
image: portainer/agent:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
networks:
- portainer_agent
# TODO: Add healthcheck (curl not available within container)
deploy:
mode: global
placement:
constraints: [node.platform.os == linux]
portainer:
image: portainer/portainer-ce:latest
# portainer clashes with traefik basic auth's header "Authorization"
# Plus we're using traefik for auth
command: -H tcp://tasks.agent:9001 --tlsskipverify
networks:
- portainer_agent
- overlay_network
environment:
- PUID=${PUID}
- PGID=${GROUP_ID_DOWNLOADERS}
- TZ=${TZ}
volumes:
- portainer_data:/data
# TODO: Add healthcheck (curl not available within container)
deploy:
restart_policy:
condition: on-failure
mode: replicated
replicas: 1
placement:
constraints: [node.role == manager]
labels:
- traefik.enable=true
- traefik.http.routers.portainer.entrypoints=websecure
- traefik.http.routers.portainer.rule=Host(`portainer.${HTPC_DOMAIN}`)
- traefik.http.routers.portainer.tls=true
- traefik.http.routers.portainer.middlewares=auth
- traefik.http.services.portainer.loadbalancer.server.port=9000
networks:
portainer_agent:
driver: overlay
attachable: true
overlay_network:
external: true
volumes:
portainer_data: