From f155f3c31ac9a9fd972d74af4cf29f90b36741f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Le=20Ray?= Date: Tue, 11 Dec 2018 16:34:16 +0100 Subject: [PATCH] server: add support for domain, protocol & root_url --- grafana/files/grafana.ini | 6 +++--- grafana/map.jinja | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/grafana/files/grafana.ini b/grafana/files/grafana.ini index 7742a8f..6866229 100644 --- a/grafana/files/grafana.ini +++ b/grafana/files/grafana.ini @@ -20,7 +20,7 @@ logs = {{ server.path.logs }} #################################### Server #################################### [server] # Protocol (http or https) -;protocol = http +protocol = {{ server.protocol }} # The ip address to bind to, empty will bind to all interfaces http_addr = {{ server.bind.address }} @@ -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.domain }} # 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.root_url }} # Log web requests ;router_logging = false diff --git a/grafana/map.jinja b/grafana/map.jinja index c7c4bd4..c1b1478 100644 --- a/grafana/map.jinja +++ b/grafana/map.jinja @@ -6,6 +6,9 @@ Debian: service: grafana-server user: grafana group: grafana + protocol: http + domain: localhost + root_url: '%(protocol)s://%(domain)s:%(http_port)s/' path: home: /usr/share/grafana data: /var/lib/grafana