Skip to content

Commit

Permalink
Add grafana instance for local dev setup
Browse files Browse the repository at this point in the history
  • Loading branch information
alukach committed Nov 12, 2024
1 parent f97d988 commit a31b338
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
KEYCLOAK_LOGLEVEL: INFO
ROOT_LOGLEVEL: INFO
ports:
- "8080:8080"
- 8080:8080
command:
- start-dev
develop:
Expand All @@ -28,6 +28,12 @@ services:
IMPORT_FILES_LOCATIONS: /config/*
IMPORT_CACHE_ENABLED: false
IMPORT_VARSUBSTITUTION_ENABLED: true
# Mock secrets
GRAFANA_CLIENT_SECRET: mock_grafana_client_secret
GRAFANA_CLIENT_URL: http://localhost:3000
CILOGON_CLIENT_ID: abc13
CILOGON_CLIENT_SECRET: abc123

env_file:
- path: .env
required: false
Expand All @@ -37,3 +43,25 @@ services:
- action: sync+restart
path: ./config/src
target: /config
grafana:
profiles:
- grafana
image: grafana/grafana:latest
ports:
- 3000:3000
environment:
GF_AUTH_GENERIC_OAUTH_ENABLED: "true"
GF_AUTH_GENERIC_OAUTH_ALLOW_SIGN_UP: "true"
GF_AUTH_GENERIC_OAUTH_AUTO_LOGIN: "false"
GF_AUTH_GENERIC_OAUTH_NAME: "VEDA Keycloak"
GF_AUTH_GENERIC_OAUTH_SCOPES: "openid profile email"
# Role Mapping
# - GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_STRICT: "true" if require_matching_scope else "false",
GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_PATH: role_attribute_path_expression
GF_AUTH_GENERIC_OAUTH_ALLOW_ASSIGN_GRAFANA_ADMIN: "true"
# Auth server details
GF_AUTH_GENERIC_OAUTH_CLIENT_ID: grafana
GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET: mock_grafana_client_secret
GF_AUTH_GENERIC_OAUTH_AUTH_URL: http://localhost:8080/realms/veda/protocol/openid-connect/auth
GF_AUTH_GENERIC_OAUTH_TOKEN_URL: http://keycloak:8080/realms/veda/protocol/openid-connect/token
GF_AUTH_GENERIC_OAUTH_API_URL: http://keycloak:8080/realms/veda/protocol/openid-connect/userinfo

0 comments on commit a31b338

Please sign in to comment.