argus-netconf-exporter/deploytest/docker-compose.yml

42 lines
1.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

version: "3.8"
networks:
monitor_net:
driver: bridge
services:
prometheus:
image: prom/prometheus:latest
container_name: deploytest-prometheus
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
# - ./prometheus/alerts.yml:/etc/prometheus/alerts.yml:ro # 可选:如需告警规则可解开
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--web.enable-lifecycle"
ports:
- "19090:9090"
networks:
- monitor_net
extra_hosts:
# 兼容 Linux让容器中的 host.docker.internal 指向宿主机
- "host.docker.internal:host-gateway"
grafana:
image: grafana/grafana:latest
container_name: deploytest-grafana
depends_on:
- prometheus
ports:
- "13000:3000"
networks:
- monitor_net
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning:ro
- ./grafana/dashboards:/var/lib/grafana/dashboards:ro
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false