Last active
March 6, 2024 11:00
-
-
Save febriliankr/f2d41fd9fc6e2cef4515902879369e5a to your computer and use it in GitHub Desktop.
Grafana Loki
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
networks: | |
loki: | |
services: | |
loki: | |
image: grafana/loki:2.9.4 | |
ports: | |
- "3100:3100" | |
command: -config.file=/etc/loki/local-config.yaml | |
networks: | |
- loki | |
promtail: | |
image: grafana/promtail:2.9.4 | |
volumes: | |
- /var/log:/var/log | |
command: -config.file=/etc/promtail/config.yml | |
networks: | |
- loki | |
grafana: | |
environment: | |
- GF_PATHS_PROVISIONING=/etc/grafana/provisioning | |
- GF_AUTH_ANONYMOUS_ENABLED=true | |
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin | |
entrypoint: | |
- sh | |
- -euc | |
- | | |
mkdir -p /etc/grafana/provisioning/datasources | |
cat <<EOF > /etc/grafana/provisioning/datasources/ds.yaml | |
apiVersion: 1 | |
datasources: | |
- name: Loki | |
type: loki | |
access: proxy | |
orgId: 1 | |
url: http://loki:3100 | |
basicAuth: false | |
isDefault: true | |
version: 1 | |
editable: false | |
EOF | |
/run.sh | |
image: grafana/grafana:latest | |
ports: | |
- "3003:3000" | |
networks: | |
- loki |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment