Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Grafana to local development stack #157

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .docker/grafana.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[server]
http_port = 3000

[security]
admin_user = admin
admin_password = admin

[users]
allow_sign_up = false

[paths]
provisioning = /etc/grafana/provisioning:ro
8 changes: 8 additions & 0 deletions .docker/provisioning/datasources/all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: 1

datasources:
- name: Prometheus
type: prometheus
url: http://prometheus:9090
access: proxy
isDefault: true
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,20 @@ services:
retries: 8
ports:
- ${ELASTICSEARCH_PORT:-9200}:9200
grafana:
image: grafana/grafana:10.0.3
restart: unless-stopped
ports:
- ${GRAFANA_PORT:-3000}:3000
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:-admin}
volumes:
- grafana-data:/var/lib/grafana
- ./.docker/grafana.ini:/etc/grafana/grafana.ini:ro
- ./.docker/provisioning:/etc/grafana/provisioning:ro
depends_on:
- prometheus
exporter:
build:
context: .
Expand All @@ -89,3 +103,4 @@ volumes:
prometheus-data:
elasticsearch-data:
elasticsearch-logs:
grafana-data: