plc-mirror/prometheus/docker-compose.yml

25 lines
628 B
YAML
Raw Normal View History

2024-02-18 16:37:50 +01:00
version: '3.8'
services:
prometheus:
image: prom/prometheus
# needed if mounted in custom volume
user: root
volumes:
- "./prometheus.yml:/etc/prometheus/prometheus.yml"
- "${PROMETHEUS_DATA_DIR:?specify data dir in .env file}:/prometheus"
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- 9090:9090
grafana:
build:
context: ./grafana
container_name: grafana
user: root
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- 9000:3000
volumes:
- ${GRAFANA_DATA_DIR:?specify data dir in .env file}:/var/lib/grafana