homeserver/docker-compose/loki/docker-compose.yml.j2

47 lines
1.6 KiB
Text
Raw Normal View History

2024-09-23 21:29:52 +02:00
# https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/prometheus_grafana_loki
# https://ghazanfaralidevops.medium.com/grafana-loki-promtail-complete-end-to-end-project-d698aaa636d6
2024-09-23 20:48:45 +02:00
services:
loki:
2024-09-23 21:04:06 +02:00
image: grafana/loki:3.2.0
2024-09-23 20:48:45 +02:00
container_name: loki
restart: always
volumes:
2024-09-23 20:59:25 +02:00
- loki:/loki
2024-09-23 20:48:45 +02:00
- ./loki-config.yml:/etc/loki-config.yml
command:
- '-config.file=/etc/loki-config.yml'
ports:
- "3100:3100"
2024-09-23 20:59:25 +02:00
networks:
- internal
grafana:
image: grafana/grafana:9.4.3
container_name: grafana
restart: always
2024-09-23 21:02:45 +02:00
env_file: grafana.env
2024-09-23 20:59:25 +02:00
volumes:
- grafana:/var/lib/grafana
2024-09-23 21:55:13 +02:00
- ./datasources.yaml:/etc/grafana/provisioning/datasources.yaml
2024-09-23 21:08:23 +02:00
ports:
- "3101:3000"
2024-09-23 20:59:25 +02:00
networks:
- internal
2024-09-23 20:48:45 +02:00
######## Networks ########
networks:
2024-09-23 20:59:25 +02:00
postfix:
external: true
internal:
2024-09-23 20:48:45 +02:00
######## Volumes ########
volumes:
2024-09-23 20:59:25 +02:00
loki:
grafana:
2024-09-23 21:24:24 +02:00
# TODO: http://vm-test-2204.mgrote.net:9080/targets + wenn firewall aus
2024-09-23 21:29:52 +02:00
# TODO: grafana dashboard und datasource als code? + https://grafana.com/docs/grafana/latest/administration/provisioning/#datasources
2024-09-23 21:36:26 +02:00
# TODO: URLS: http://docker10.mgrote.net:3101/explore?orgId=1&left=%7B%22datasource%22:%22U4h5CxgHz%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22U4h5CxgHz%22%7D%7D%5D,%22range%22:%7B%22from%22:%22now-1h%22,%22to%22:%22now%22%7D%7D + http://docker10.mgrote.net:3100/ready + http://vm-test-2204.mgrote.net:9080/config
2024-09-23 21:41:38 +02:00
# TODO: grafana an LDAP: https://github.com/lldap/lldap/blob/main/example_configs/grafana_ldap_config.toml