fix(service): use FQDN instead of URL for Grafana GF_SERVER_DOMAIN

GF_SERVER_DOMAIN expects a bare hostname (e.g. grafana.example.com) but
was set to SERVICE_URL_GRAFANA which includes the protocol
(https://grafana.example.com). This mismatch can cause Grafana to fail
to load its application files when deployed behind Coolify's proxy.

Changed to SERVICE_FQDN_GRAFANA which provides just the hostname. Applied
the fix to both grafana.yaml and grafana-with-postgresql.yaml templates.

Fixes #5307
This commit is contained in:
Xidik 2026-03-22 22:04:22 +07:00
parent 8be226788e
commit 95351eba89
2 changed files with 2 additions and 2 deletions

View file

@ -11,7 +11,7 @@ services:
environment:
- SERVICE_URL_GRAFANA_3000
- GF_SERVER_ROOT_URL=${SERVICE_URL_GRAFANA}
- GF_SERVER_DOMAIN=${SERVICE_URL_GRAFANA}
- GF_SERVER_DOMAIN=${SERVICE_FQDN_GRAFANA}
- GF_SECURITY_ADMIN_PASSWORD=${SERVICE_PASSWORD_GRAFANA}
- GF_DATABASE_TYPE=postgres
- GF_DATABASE_HOST=postgresql

View file

@ -11,7 +11,7 @@ services:
environment:
- SERVICE_URL_GRAFANA_3000
- GF_SERVER_ROOT_URL=${SERVICE_URL_GRAFANA}
- GF_SERVER_DOMAIN=${SERVICE_URL_GRAFANA}
- GF_SERVER_DOMAIN=${SERVICE_FQDN_GRAFANA}
- GF_SECURITY_ADMIN_PASSWORD=${SERVICE_PASSWORD_GRAFANA}
volumes:
- grafana-data:/var/lib/grafana