-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-portainer.yml
68 lines (61 loc) · 1.64 KB
/
docker-compose-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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
version: '3.3'
networks:
revproxy:
external:
name: boot_revproxy
# # SWARM only
# portainer:
# driver: overlay
# internal: true
services:
# # SWARM only
# portainer-agent:
# image: portainer/agent
# environment:
# # SWARM: Set AGENT_CLUSTER_ADDR to the agent service name prefixed by "tasks." when deployed inside an overlay network.
# AGENT_CLUSTER_ADDR: tasks.portainer-agent
# AGENT_PORT: 9001
# LOG_LEVEL: INFO
# volumes:
# - type: bind
# source: /var/run/docker.sock
# target: /var/run/docker.sock
# networks:
# - portainer
# deploy:
# mode: global
portainer:
image: portainer/portainer
command:
- "--host"
# SWARM only: Set to the agent service name prefixed by "tasks." when deployed inside an overlay network.
#- "tcp://tasks.portainer-agent:9001"
# without SWARM only: Set to Docker socket.
- "unix:///var/run/docker.sock"
- "--tlsskipverify"
- "--admin-password-file"
- "/run/secrets/portainer"
volumes:
- ./volumes/portainer:/data
# without SWARM only
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
secrets:
- portainer
networks:
# SWARM only
#- portainer
- revproxy
labels:
- "traefik.backend=portainer"
- "traefik.port=9000"
- "traefik.frontend.rule=PathPrefixStrip:/portainer/"
- "traefik.docker.network=tarzan-platform-docker_revproxy"
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
secrets:
portainer:
file: ./portainer-admin-password-file