From 40c9de3388fda8ddf839fbd095b41a3ae416a216 Mon Sep 17 00:00:00 2001 From: Resistencia Dev Date: Mon, 22 Dec 2025 17:27:03 +0100 Subject: [PATCH] fix: Configurar correctamente variables de entorno para acceso desde red local - Agregar ARG en client/Dockerfile para NEXT_PUBLIC_API_URL - Pasar build args en docker-compose.yml - Asegurar que Next.js reciba la URL correcta del servidor - Permitir acceso desde 192.168.1.131 --- client/Dockerfile | 3 +++ docker-compose.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/client/Dockerfile b/client/Dockerfile index 0fca3dd..906c3e3 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,5 +1,8 @@ FROM node:20-alpine +# Build argument for API URL +ARG NEXT_PUBLIC_API_URL=http://localhost:4000 + # Create app directory WORKDIR /app diff --git a/docker-compose.yml b/docker-compose.yml index dc54a40..518d5da 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,8 @@ services: build: context: . dockerfile: client/Dockerfile + args: + - NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:4000} ports: - "3000:3000" volumes: