-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathportainer-stack.yml
More file actions
67 lines (63 loc) · 2.11 KB
/
portainer-stack.yml
File metadata and controls
67 lines (63 loc) · 2.11 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
57
58
59
60
61
62
63
64
65
66
67
version: '3.2'
services:
agent:
deploy:
mode: 'global'
placement:
constraints: [node.platform.os == linux]
logging:
driver: 'json-file'
options:
max-size: '10m'
max-file: '3'
image: 'portainer/agent:2.20.0-alpine@sha256:cb31798105b5ceaadcd67c0db0c75ab8246f0942df07c6ffa070997d345f21c4'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
- '/var/lib/docker/volumes:/var/lib/docker/volumes'
networks:
- 'portainer-agents'
portainer:
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints: [node.role == manager]
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.my-portainer-router.tls=true'
- 'traefik.http.routers.my-portainer-router.rule=Host(`portainer.dark.florist`)'
- 'traefik.http.routers.my-portainer-router.service=my-portainer-service'
- 'traefik.http.services.my-portainer-service.loadbalancer.server.port=9000'
logging:
driver: 'json-file'
options:
max-size: '10m'
max-file: '3'
image: 'portainer/portainer-ce:2.20.0@sha256:6719feba5c8098ee958795190a30e8d5210c00c2917aaa7a5793800054d8c2c0'
command: '-H tcp://tasks.agent:9001 --tlsskipverify'
# uncomment these initially so you can connect to localhost:9000 via SSH tunnel, and then comment them back out once traefik is up and running
# this lets us use Portainer to deploy Traefik, but then use Traefik to access portainer with proper end to end TLS termination once things are up
#ports:
# - '9443:9443'
# - '9000:9000'
# - '8000:8000'
volumes:
- 'portainer_data:/data'
# workaround for https://github.com/portainer/portainer/issues/8806
- '/var/run/docker.sock:/var/run/docker.sock:ro'
networks:
- 'portainer-agents'
- 'traefik'
# needs internet access to pull stack definitions from GitHub
- 'public-facing'
networks:
portainer-agents:
driver: 'overlay'
attachable: true
internal: true
traefik:
external: true
public-facing:
external: true
volumes:
portainer_data: