-
Notifications
You must be signed in to change notification settings - Fork 0
/
dc-portainer.yaml
51 lines (51 loc) · 1.41 KB
/
dc-portainer.yaml
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
services:
portainer:
container_name: portainer
image: portainer/portainer-ce:latest
depends_on:
- portainer-agent
env_file:
- env/env-general.env
networks:
- lan
ports:
- "9443:9443" # I left this port exposed on purpose if Traefik container fails so I have direct access to container management
command: -H tcp://portainer-agent:9001 --tlsskipverify
volumes:
- /home/pi/docker/portainer:/data
- /var/run/docker.sock:/var/run/docker.sock
logging:
driver: "json-file"
options:
max-size: "5k"
max-file: "5"
healthcheck:
test: ["CMD", "wget", "--tries=1", "--spider", "http://localhost:9000/api/system/status"]
interval: 300s
timeout: 10s
retries: 3
restart: always
portainer-agent:
container_name: portainer-agent
image: portainer/agent
env_file:
- env/env-general.env
networks:
- lan
environment:
AGENT_CLUSTER_ADDR: portainer-agent
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
- /:/host
logging:
driver: "json-file"
options:
max-size: "5k"
max-file: "5"
healthcheck:
test: ["CMD", "wget", "--tries=1", "--spider", "--no-check-certificate", "https://localhost:9001/ping"]
interval: 300s
timeout: 10s
retries: 5
restart: always