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>
This commit is contained in:
Amin Vakil 2020-04-10 12:00:54 +04:30 committed by GitHub
parent d3c5f28243
commit 93ff67d258
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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