mirror of
https://github.com/Haxxnet/Compose-Examples.git
synced 2025-11-23 17:04:27 +01:00
make grafana stack instantly deployable
This commit is contained in:
@@ -7,14 +7,14 @@ services:
|
||||
hostname: loki
|
||||
container_name: loki
|
||||
volumes:
|
||||
- /mnt/docker-volumes/loki:/etc/loki # see example-configs and place loki-config.yml
|
||||
- ./volume-data/loki:/etc/loki # see example-configs and place loki-config.yml
|
||||
ports:
|
||||
- "127.0.0.1:3100:3100"
|
||||
restart: unless-stopped
|
||||
user: 1000:1000
|
||||
command: -config.file=/etc/loki/loki-config.yml
|
||||
networks:
|
||||
- monitoring_default
|
||||
#networks:
|
||||
# - monitoring_default
|
||||
|
||||
promtail:
|
||||
image: grafana/promtail:latest
|
||||
@@ -23,13 +23,13 @@ services:
|
||||
- loki
|
||||
hostname: promtail
|
||||
volumes:
|
||||
- /var/log:/var/log
|
||||
- /mnt/docker-volumes/promtail:/etc/promtail # see example-configs and place promtail-config.yml
|
||||
#- /mnt/docker-volumes/traefik/logs:/var/log/traefik
|
||||
- /var/log:/var/log:ro # let promtail access the docker host's log files
|
||||
- ./volume-data/promtail:/etc/promtail # see example-configs and place promtail-config.yml
|
||||
#- /mnt/docker-volumes/traefik/logs:/var/log/traefik # let promtail access your traefik reverse logs
|
||||
restart: unless-stopped
|
||||
command: -config.file=/etc/promtail/promtail-config.yml
|
||||
networks:
|
||||
- monitoring_default
|
||||
#networks:
|
||||
# - monitoring_default
|
||||
|
||||
influxdb:
|
||||
image: influxdb:1.8.10
|
||||
@@ -37,14 +37,14 @@ services:
|
||||
hostname: influxdb
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /mnt/docker-volumes/influxdb/data:/var/lib/influxdb
|
||||
- /mnt/docker-volumes/influxdb/influxdb.conf:/etc/influxdb/influxdb.conf:ro # see example-configs and place infuxdb.conf
|
||||
- /mnt/docker-volumes/influxdb/init:/docker-entrypoint-initdb.d # see example-configs and place create-database.iql
|
||||
- ./volume-data/influxdb/data:/var/lib/influxdb
|
||||
- ./volume-data/influxdb/influxdb.conf:/etc/influxdb/influxdb.conf:ro # see example-configs and place infuxdb.conf
|
||||
- ./volume-data/influxdb/init:/docker-entrypoint-initdb.d # see example-configs and place create-database.iql
|
||||
environment:
|
||||
- INFLUXDB_ADMIN_USER=admin
|
||||
- INFLUXDB_ADMIN_PASSWORD=SuperDuperAdminPW
|
||||
networks:
|
||||
- monitoring_default
|
||||
#networks:
|
||||
# - monitoring_default
|
||||
|
||||
telegraf:
|
||||
image: telegraf:latest
|
||||
@@ -58,7 +58,7 @@ services:
|
||||
depends_on:
|
||||
- influxdb
|
||||
volumes:
|
||||
- /mnt/docker-volumes/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro # see example-configs and place telegraf.conf
|
||||
- ./volume-data/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro # see example-configs and place telegraf.conf
|
||||
- /:/hostfs:ro
|
||||
- /etc:/hostfs/etc:ro
|
||||
- /proc:/hostfs/proc:ro
|
||||
@@ -70,8 +70,8 @@ services:
|
||||
- HOST_PROC=/hostfs/proc
|
||||
- HOST_SYS=/hostfs/sys
|
||||
- HOST_MOUNT_PREFIX=/hostfs
|
||||
networks:
|
||||
- monitoring_default
|
||||
#networks:
|
||||
# - monitoring_default
|
||||
|
||||
grafana:
|
||||
container_name: grafana
|
||||
@@ -86,11 +86,11 @@ services:
|
||||
#environment:
|
||||
# - GF_SERVER_ROOT_URL=https://grafana.example.com # optional
|
||||
volumes:
|
||||
- /mnt/docker-volumes/grafana:/var/lib/grafana
|
||||
- ./volume-data/grafana:/var/lib/grafana
|
||||
ports:
|
||||
- 3000:3000
|
||||
networks:
|
||||
- monitoring_default
|
||||
#networks:
|
||||
# - monitoring_default
|
||||
#labels:
|
||||
# - traefik.enable=true
|
||||
# - traefik.http.routers.grafana.rule=Host(`grafana.example.com`)
|
||||
@@ -99,6 +99,6 @@ services:
|
||||
# # Part for local lan services only
|
||||
# - traefik.http.routers.grafana.middlewares=local-ipwhitelist@file
|
||||
|
||||
networks:
|
||||
monitoring_default:
|
||||
external: true
|
||||
#networks:
|
||||
# monitoring_default:
|
||||
# external: true
|
||||
|
||||
Reference in New Issue
Block a user