46 lines
1.5 KiB
Django/Jinja
46 lines
1.5 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:/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
|
|
# TODO: grafana an LDAP: https://github.com/lldap/lldap/blob/main/example_configs/grafana_ldap_config.toml
|