Add monitoring auto-deployment
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
services:
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
container_name: prometheus
|
||||
ports:
|
||||
- "9090:9090"
|
||||
volumes:
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||
- ./prometheus-web.yml:/etc/prometheus/prometheus-web.yml:ro
|
||||
- prom_data:/prometheus
|
||||
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--web.config.file=/etc/prometheus/prometheus-web.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
- '--web.enable-admin-api'
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: grafana
|
||||
ports:
|
||||
- "3001:3000"
|
||||
volumes:
|
||||
- ./grafana_provisioning/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml:ro
|
||||
- grafana_data:/var/lib/grafana
|
||||
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_USER="{{ grafana_admin_user }}"
|
||||
- GF_SECURITY_ADMIN_PASSWORD="{{ grafana_admin_password }}"
|
||||
- GF_USERS_ALLOW_SIGN_UP=false
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
depends_on:
|
||||
- prometheus
|
||||
|
||||
volumes:
|
||||
prom_data:
|
||||
grafana_data:
|
||||
Reference in New Issue
Block a user