-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-monitor.yml
57 lines (53 loc) · 1.75 KB
/
docker-compose-monitor.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
volumes:
portainer_data:
services:
# ==========================================================================
# Portainer service
# => Monitor and manage docker environment with a web UI
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
labels:
# Enable automatic update with Watchtower
- "com.centurylinklabs.watchtower.enable=true"
volumes:
# Sync time with docker host
- /etc/localtime:/etc/localtime:ro
# Access Docker socket to manage all containers
- /var/run/docker.sock:/var/run/docker.sock
# Portainer data (not persisted)
- portainer_data:/data
ports:
- 8000:8000
# Portainer web UI port
- 9000:9000
restart: always
# ==========================================================================
# Watchtower service
# => Automatically updates docker images and containers
watchtower:
# For x86 / x64 processors:
image: containrrr/watchtower:latest
# For ARM processors:
#image: containrrr/watchtower:armhf-latest
container_name: watchtower
labels:
# Enable automatic update with Watchtower
- "com.centurylinklabs.watchtower.enable=true"
dns:
# Public DNS
- 8.8.8.8
- 8.8.4.4
environment:
# Only watch and update labelled containers
- WATCHTOWER_LABEL_ENABLE=true
# Restart one image at time instead of stopping and starting all at once
- WATCHTOWER_ROLLING_RESTART=true
# Job scheduler (cron format)
- "WATCHTOWER_SCHEDULE=0 15 5 * * *"
volumes:
# Sync time with docker host
- /etc/localtime:/etc/localtime:ro
# Access Docker socket to manage all containers
- /var/run/docker.sock:/var/run/docker.sock
restart: always