Skip to content

Commit

Permalink
Add Grafana to local development stack (kuskoman#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuskoman authored Aug 17, 2023
1 parent 065a4af commit 73bebcb
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
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 @@ -90,3 +104,4 @@ volumes:
prometheus-data:
elasticsearch-data:
elasticsearch-logs:
grafana-data:

0 comments on commit 73bebcb

Please sign in to comment.