fix(service): allow overriding GOTRUE_SITE_URL in Supabase template

The Supabase template hardcoded GOTRUE_SITE_URL to the internal Supabase
Kong URL, which caused OAuth redirects to go to the Supabase API domain
instead of the user's frontend domain. This broke Google OAuth, magic
links, and other redirect-based auth flows.

Allow users to set GOTRUE_SITE_URL in the Coolify UI to their frontend
domain while keeping the Supabase URL as a sensible default.

Fixes #5581
This commit is contained in:
Xidik 2026-03-22 22:02:13 +07:00
parent 8be226788e
commit 949cce1097

View file

@ -975,7 +975,7 @@ services:
- GOTRUE_DB_DRIVER=postgres
- GOTRUE_DB_DATABASE_URL=postgres://supabase_auth_admin:${SERVICE_PASSWORD_POSTGRES}@${POSTGRES_HOSTNAME:-supabase-db}:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-postgres}
# The base URL your site is located at. Currently used in combination with other settings to construct URLs used in emails.
- GOTRUE_SITE_URL=${SERVICE_URL_SUPABASEKONG}
- GOTRUE_SITE_URL=${GOTRUE_SITE_URL:-${SERVICE_URL_SUPABASEKONG}}
# A comma separated list of URIs (e.g. "https://foo.example.com,https://*.foo.example.com,https://bar.example.com") which are permitted as valid redirect_to destinations.
- GOTRUE_URI_ALLOW_LIST=${ADDITIONAL_REDIRECT_URLS}
- GOTRUE_DISABLE_SIGNUP=${DISABLE_SIGNUP:-false}