version: '3'
services:
postgres:
image: postgres:latest
environment:
- POSTGRES_USER=grafana
- POSTGRES_PASSWORD
- POSTGRES_DB=grafanadb
volumes:
- ./data/postgres:/var/lib/postgresql/data/
restart: always
healthcheck:
test: pg_isready -U grafana -d grafanadb
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:latest
test: ["CMD", "redis-cli", "ping"]
timeout: 3s
retries: 3
grafana:
image: grafana/grafana:latest
user: "1000"
- ./data/grafana:/var/lib/grafana
- ./data/grafana-config:/etc/grafana
ports:
- 127.0.0.1:84:3000
depends_on:
- postgres
- redis
prometheus:
image: prom/prometheus:latest
container_name: grafana_prometheus
command:
- --config.file=/etc/prometheus/prometheus.yml
- ./conf/prometheus.yml:/etc/prometheus/prometheus.yml
- ./data/prometheus:/prometheus
extra_hosts:
- "host.docker.internal:host-gateway"
unbound-telemetry:
build: unbound-telemetry
- uds
- --control-interface
- /data/remote-control.sock
- ./data/unbound-telemetry:/data
test: curl --silent --fail http://127.0.0.1:9167/healthcheck || exit 1
timeout: 1s