Add restart policy (#53)

It's almost no possible monitoring solution which it's OK to stop monitoring server itself upon a problem.

Signed-off-by: Amin Vakil <info@aminvakil.com>
master
Amin Vakil 5 years ago committed by GitHub
parent d3c5f28243
commit 93ff67d258
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7,6 +7,8 @@ services:
- '--config.file=/etc/prometheus/prometheus.yml' - '--config.file=/etc/prometheus/prometheus.yml'
ports: ports:
- 9090:9090 - 9090:9090
restart:
- unless-stopped
volumes: volumes:
- ./prometheus:/etc/prometheus - ./prometheus:/etc/prometheus
- prom_data:/prometheus - prom_data:/prometheus
@ -15,6 +17,8 @@ services:
container_name: grafana container_name: grafana
ports: ports:
- 3000:3000 - 3000:3000
restart:
- unless-stopped
environment: environment:
- GF_SECURITY_ADMIN_USER=admin - GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=grafana - GF_SECURITY_ADMIN_PASSWORD=grafana

Loading…
Cancel
Save