43 lines
1.1 KiB
Django/Jinja
43 lines
1.1 KiB
Django/Jinja
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:
|
|
- "127.0.0.1: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:
|