Skip to content

Commit 98c83ad

Browse files
authored
update container tags to :latest (geerlingguy#524)
added volume: - /etc/localtime:/etc/localtime:ro to syncronize time & timezone to containers
1 parent 7657dd9 commit 98c83ad

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

templates/docker-compose.yml.j2

+18-13
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,23 @@ networks:
1515
services:
1616
{% if domain_name_enable %}
1717
nginx-proxy:
18-
image: nginxproxy/nginx-proxy
18+
image: nginxproxy/nginx-proxy:latest
1919
restart: always
2020
ports:
2121
- "80:80"
2222
networks:
2323
- back-tier
2424
- front-tier
2525
volumes:
26+
- /etc/localtime:/etc/localtime:ro
2627
- /var/run/docker.sock:/tmp/docker.sock:ro
2728
{% endif %}
2829

2930
prometheus:
30-
image: prom/prometheus:v2.25.2
31+
image: prom/prometheus:latest
3132
restart: always
3233
volumes:
34+
- /etc/localtime:/etc/localtime:ro
3335
- ./prometheus/:/etc/prometheus/
3436
- prometheus_data:/prometheus
3537
command:
@@ -54,9 +56,10 @@ services:
5456
{% endif %}
5557

5658
grafana:
57-
image: grafana/grafana
59+
image: grafana/grafana:latest
5860
restart: always
5961
volumes:
62+
- /etc/localtime:/etc/localtime:ro
6063
- grafana_data:/var/lib/grafana
6164
- ./grafana/provisioning/:/etc/grafana/provisioning/
6265
depends_on:
@@ -77,41 +80,43 @@ services:
7780
{% endif %}
7881

7982
ping:
80-
tty: true
81-
stdin_open: true
83+
image: prom/blackbox-exporter:latest
84+
restart: always
85+
volumes:
86+
- /etc/localtime:/etc/localtime:ro
87+
- ./blackbox/config:/config
8288
expose:
8389
- 9115
8490
ports:
8591
- 9115:9115
86-
image: prom/blackbox-exporter
87-
restart: always
88-
volumes:
89-
- ./blackbox/config:/config
92+
tty: true
93+
stdin_open: true
9094
command:
9195
- '--config.file=/config/blackbox.yml'
9296
networks:
9397
- back-tier
9498

9599
speedtest:
100+
image: miguelndecarvalho/speedtest-exporter:latest
101+
restart: always
96102
expose:
97103
- 9798
98104
ports:
99105
- 9798:9798
100-
image: miguelndecarvalho/speedtest-exporter
101-
restart: always
102106
networks:
103107
- back-tier
104108

105109
nodeexp:
110+
image: prom/node-exporter:latest
111+
restart: always
106112
privileged: true
107-
image: prom/node-exporter
108113
volumes:
114+
- /etc/localtime:/etc/localtime:ro
109115
- /proc:/host/proc:ro
110116
- /sys:/host/sys:ro
111117
- /:/rootfs:ro
112118
ports:
113119
- 9100:9100
114-
restart: always
115120
command:
116121
- '--path.procfs=/host/proc'
117122
- '--path.sysfs=/host/sys'

templates/pi-hole-docker-compose.yml.j2

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ services:
1414
pihole:
1515
container_name: pihole
1616
image: pihole/pihole:latest
17+
restart: unless-stopped
1718
hostname: '{{ pihole_hostname }}'
1819
ports:
1920
- "53:53/tcp"
@@ -40,6 +41,7 @@ services:
4041
- 127.0.0.1
4142
- 8.8.8.8
4243
volumes:
44+
- /etc/localtime:/etc/localtime:ro
4345
- './etc-pihole/:/etc/pihole/'
4446
- './etc-dnsmasq.d/:/etc/dnsmasq.d/'
4547
cap_add:
@@ -59,11 +61,11 @@ services:
5961
- "{{ domain_prometheus }}.{{ domain_name }}:{{ ansible_facts['default_ipv4']['address'] }}"
6062
{% endif %}
6163
{% endif %}
62-
restart: unless-stopped
6364

6465
pihole-exporter:
6566
container_name: pihole-exporter
6667
image: ekofr/pihole-exporter:latest
68+
restart: unless-stopped
6769
hostname: 'pihole-exporter'
6870
ports:
6971
- "9617:9617"
@@ -72,4 +74,3 @@ services:
7274
PIHOLE_PASSWORD: '{{ pihole_password }}'
7375
INTERVAL: '30s'
7476
PORT: 9617
75-
restart: unless-stopped

0 commit comments

Comments
 (0)