homeserver/docker-compose/loki/docker-compose.yml.j2
Michael Grote c979bc1108
Some checks failed
ansible-lint / gitleaks (pull_request) Successful in 4s
ansible-lint / Ansible Lint (pull_request) Failing after 45s
dd
2024-09-23 21:36:26 +02:00

45 lines
1.4 KiB
Django/Jinja

# 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
services:
loki:
image: grafana/loki:3.2.0
container_name: loki
restart: always
volumes:
- loki:/loki
- ./loki-config.yml:/etc/loki-config.yml
command:
- '-config.file=/etc/loki-config.yml'
ports:
- "3100:3100"
networks:
- internal
grafana:
image: grafana/grafana:9.4.3
container_name: grafana
restart: always
env_file: grafana.env
volumes:
- grafana:/var/lib/grafana
- datasources.j2:/etc/grafana/provisioning/dashboards
ports:
- "3101:3000"
networks:
- internal
######## Networks ########
networks:
postfix:
external: true
internal:
######## Volumes ########
volumes:
loki:
grafana:
# TODO: http://vm-test-2204.mgrote.net:9080/targets + wenn firewall aus
# TODO: grafana dashboard und datasource als code? + https://grafana.com/docs/grafana/latest/administration/provisioning/#datasources
# 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