meshtastic-metrics-exporter/docker-compose.yml

63 lines
1.4 KiB
YAML

volumes:
prometheus_data:
grafana_data:
postgres_data:
services:
prometheus:
image: prom/prometheus:v2.51.2
restart: unless-stopped
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "9090:9090"
networks:
- mesh-bridge
volumes:
- prometheus_data:/prometheus
- ./docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
grafana:
build:
context: .
dockerfile: ./docker/grafana/Dockerfile.grafana
restart: unless-stopped
ports:
- "3000:3000"
networks:
- mesh-bridge
volumes:
- grafana_data:/var/lib/grafana
- ./docker/grafana/provisioning:/etc/grafana/provisioning
exporter:
build:
context: .
dockerfile: ./docker/exporter/Dockerfile.exporter
restart: unless-stopped
depends_on:
- prometheus
- postgres
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- .env
networks:
- mesh-bridge
postgres:
image: postgres:16.3
restart: unless-stopped
networks:
- mesh-bridge
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_DB: "meshtastic"
networks:
mesh-bridge:
driver: bridge