From 42c1e20ee390ad6f9de9e1ba9e7ea09897e03d07 Mon Sep 17 00:00:00 2001 From: josedario87 Date: Mon, 13 Oct 2025 17:52:52 -0600 Subject: [PATCH] fix: use Docker container name for Metabase internal communication Change Metabase URL from public domain to Docker container name for proper internal network communication between containers. Changes: - Update default METABASE_URL to http://metabase:3000 - Docker DNS resolution works correctly with container names - Maintains public domain fallback via environment variables This fixes authentication issues when containers communicate within the same Docker network. --- .env.example | 3 ++- nuxt4-app/nuxt.config.ts | 3 ++- nuxt4-app/server/utils/metabase.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 21a8209..eccaaad 100644 --- a/.env.example +++ b/.env.example @@ -2,6 +2,7 @@ NUXT_PUBLIC_AUTHENTIK_URL=https://authentik.nucleoriofrio.com # Metabase Configuration (server-side only) -METABASE_URL=https://metabase.nucleoriofrio.com +# Use container name for Docker internal communication +METABASE_URL=http://metabase:3000 METABASE_EMAIL=your-email@domain.com METABASE_PASSWORD=your-password diff --git a/nuxt4-app/nuxt.config.ts b/nuxt4-app/nuxt.config.ts index ede8493..336adbd 100644 --- a/nuxt4-app/nuxt.config.ts +++ b/nuxt4-app/nuxt.config.ts @@ -142,7 +142,8 @@ export default defineNuxtConfig({ }, runtimeConfig: { // Server-side only - metabaseUrl: process.env.METABASE_URL || 'https://metabase.nucleoriofrio.com', + // Use container name for Docker internal communication + metabaseUrl: process.env.METABASE_URL || 'http://metabase:3000', metabaseEmail: process.env.METABASE_EMAIL || 'claudeCode0@nucleoriofrio.com', metabasePassword: process.env.METABASE_PASSWORD || 'vK^NyZdZDH#p', // Public (client + server) diff --git a/nuxt4-app/server/utils/metabase.ts b/nuxt4-app/server/utils/metabase.ts index c93dee4..41b7912 100644 --- a/nuxt4-app/server/utils/metabase.ts +++ b/nuxt4-app/server/utils/metabase.ts @@ -5,7 +5,7 @@ */ const config = useRuntimeConfig() -const METABASE_URL = config.metabaseUrl || 'https://metabase.nucleoriofrio.com' +const METABASE_URL = config.metabaseUrl || 'http://metabase:3000' const METABASE_EMAIL = config.metabaseEmail || 'claudeCode0@nucleoriofrio.com' const METABASE_PASSWORD = config.metabasePassword || 'vK^NyZdZDH#p'