docker-compose.yml
2024-12-09 本文已影响0人
rushui
version: '3'
services:
reverse-proxy:
container_name: proxy
image: traefik:v2.4
command: --api.insecure=true --providers.docker
ports:
- "80:80"
- "8080:8080"
volumes:
- /data/traefik/traefik.yml:/etc/traefik/traefik.yml
- /var/run/docker.sock:/var/run/docker.sock
whoami:
container_name: whoami
image: freemesh/whoami
labels:
- "traefik.http.routers.whoami.rule=Host(`whoami.wang.dd`)"
prometheus:
container_name: prometheus
image: prom/prometheus
labels:
- "traefik.http.routers.prometheus.rule=Host(`prometheus.wang.dd`)"
- "traefik.http.services.prometheus.loadbalancer.server.port=9090"
ports:
- "9090:9090"
volumes:
- /data/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- /data/prometheus/data:/prometheus
alertmanager:
container_name: alertmanager
image: prom/alertmanager
labels:
- "traefik.http.routers.alertmanager.rule=Host(`alertmanager.wang.dd`)"
- "traefik.http.services.alertmanager.loadbalancer.server.port=9093"
volumes:
- /data/alertmanager:/etc/alertmanager
- /data/alertmanager/data:/alertmanager
grafana:
container_name: grafana
image: grafana/grafana
labels:
- "traefik.http.routers.grafana.rule=Host(`grafana.wang.dd`)"
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
volumes:
- /data/grafana:/var/lib/grafana
network_mode: "bridge"
elasticsearch:
container_name: elasticsearch
image: elasticsearch:7.10.1
environment:
- discovery.type=single-node
labels:
- "traefik.http.routers.elasticsearch.rule=Host(`elasticsearch.wang.dd`)"
- "traefik.http.services.elasticsearch.loadbalancer.server.port=9200"
ports:
- "9200:9200"
- "9300:9300"
kibana:
container_name: kibana
image: kibana:7.10.1
environment:
- ELASTICSEARCH_URL=http://prometheus.wang.dd:9200
labels:
- "traefik.http.routers.kibana.rule=Host(`kibana.wang.dd`)"
- "traefik.http.services.kibana.loadbalancer.server.port=5601"
ports:
- "5601:5601"