From f3f54da726ef77a37c5a28bc1df4803d2a16e7b1 Mon Sep 17 00:00:00 2001 From: Zaid Marzguioui Date: Tue, 31 Mar 2026 22:18:05 +0200 Subject: [PATCH] fix(docker): remove runtime NEXT_PUBLIC_SUPABASE_URL override NEXT_PUBLIC_ vars are baked into the Next.js bundle at build time. Setting them at runtime with Docker-internal URLs (http://supabase-kong:8000) causes SSR to fail with 500 because RSC uses the runtime value which is unreachable from the browser. Let the build-time value (https://myeasycms.frontieralgorithmics.de) be used everywhere. --- docker-compose.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 642e623b9..8d5cebab6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -321,9 +321,8 @@ services: environment: NODE_ENV: production NEXT_PUBLIC_SITE_URL: ${SITE_URL:-http://localhost:3000} - # Server-side Supabase URL — direct Docker network access to Kong - NEXT_PUBLIC_SUPABASE_URL: http://supabase-kong:8000 - NEXT_PUBLIC_SUPABASE_PUBLIC_KEY: ${SUPABASE_ANON_KEY} + # NEXT_PUBLIC_ vars are baked at build time — runtime values only apply + # to middleware/API routes. Don't override with Docker-internal URLs. SUPABASE_SECRET_KEY: ${SUPABASE_SERVICE_ROLE_KEY} SUPABASE_DB_WEBHOOK_SECRET: ${DB_WEBHOOK_SECRET:-webhooksecret} EMAIL_SENDER: ${EMAIL_SENDER:-noreply@myeasycms.de}