summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/grafana/templates/grafana.ini.j26
1 files changed, 6 insertions, 0 deletions
diff --git a/roles/grafana/templates/grafana.ini.j2 b/roles/grafana/templates/grafana.ini.j2
index 05166994..54672dea 100644
--- a/roles/grafana/templates/grafana.ini.j2
+++ b/roles/grafana/templates/grafana.ini.j2
@@ -1,7 +1,13 @@
[server]
http_port = {{ grafana_port }}
{% if grafana_hostname | length > 0 %}
+ {% if proxy_type == "caddy" %}
+root_url = https://{{ grafana_hostname }}/
+ {% elif proxy_type == "nginx" %}
root_url = http://{{ grafana_hostname }}/
+ {% else %}
+root_url = http://localhost:{{ grafana_port }}/
+ {% endif %}
{% endif %}
[database]