-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathportainer-stack.yml
More file actions
58 lines (51 loc) · 1.28 KB
/
portainer-stack.yml
File metadata and controls
58 lines (51 loc) · 1.28 KB
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
55
56
version: '3.5'
services:
agent:
image: portainer/agent:lts
#env_file: .env
environment:
# REQUIRED: Should be equal to the service name prefixed by "tasks." when
# deployed inside an overlay network
AGENT_CLUSTER_ADDR: tasks.agent
# AGENT_PORT: 9001
# LOG_LEVEL: debug
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]
server:
image: portainer/portainer-ce:lts
command: -H tcp://tasks.agent:9001 --tlsskipverify
#env_file: .env
ports:
- "9000:9000"
volumes:
- portainer_data:/data
networks:
- agent_network
- web
deploy:
mode: replicated
replicas: 1
placement:
constraints: [node.role == manager]
labels:
- traefik.enable=true
- traefik.port=9000
- traefik.frontend.rule=Host:${PORTAINER_FQDN}
# for unique app FQDN
#- traefik.frontend.rule=Host:${PORTAINER_FQDN};PathPrefixStrip:/manager
- traefik.protocol=http
networks:
agent_network:
driver: overlay
attachable: true
web:
external: true
volumes:
portainer_data: