diff --git a/grafana/files/grafana.ini b/grafana/files/grafana.ini index 5eda89d..871b252 100644 --- a/grafana/files/grafana.ini +++ b/grafana/files/grafana.ini @@ -29,14 +29,14 @@ http_addr = {{ server.bind.address }} http_port = {{ server.bind.port }} # The public facing domain name used to access grafana from a browser -;domain = localhost +domain = {{ server.get('domain', 'localhost') }} # Redirect to correct domain if host header does not match domain # Prevents DNS rebinding attacks ;enforce_domain = false # The full public facing url -;root_url = %(protocol)s://%(domain)s:%(http_port)s/ +root_url = {{ server.get('root_url', '%(protocol)s://%(domain)s:%(http_port)s/') }} # Log web requests ;router_logging = false @@ -185,15 +185,19 @@ org_name = {{ server.auth.role }} #################################### Google Auth ########################## [auth.google] +{%- if server.auth.google.get('enabled') %} +enabled = true +allowed_domains = {{ server.auth.google.get('allowed_domains', '') }} +allow_sign_up = {{ server.auth.google.get('allow_sign_up', 'false') }} +client_id = {{ server.auth.google.get('client_id', '') }} +client_secret = {{ server.auth.google.get('client_secret', '') }} +scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email +auth_url = https://accounts.google.com/o/oauth2/auth +token_url = https://accounts.google.com/o/oauth2/token +api_url = https://www.googleapis.com/oauth2/v1/userinfo +{%- else %} ;enabled = false -;allow_sign_up = false -;client_id = some_client_id -;client_secret = some_client_secret -;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email -;auth_url = https://accounts.google.com/o/oauth2/auth -;token_url = https://accounts.google.com/o/oauth2/token -;api_url = https://www.googleapis.com/oauth2/v1/userinfo -;allowed_domains = +{%- endif %} #################################### Auth Proxy ########################## [auth.proxy]