Fix: Configure VITE_API_URL for Dockploy deployment
This commit is contained in:
@@ -11,7 +11,7 @@ OPENAI_API_KEY=tu-openai-api-key-aqui
|
||||
ENVIRONMENT=production
|
||||
|
||||
# CORS - Separar múltiples dominios con comas
|
||||
ALLOWED_ORIGINS=https://tudominio.com,https://www.tudominio.com,https://app.tudominio.com
|
||||
ALLOWED_ORIGINS=http://checklist-rons-0e8a3a-63dbc4-72-61-106-199.traefik.me,http://checklist-rons-0e8a3a-63dbc4-72-61-106-199.traefik.me
|
||||
|
||||
# Frontend
|
||||
VITE_API_URL=https://api.tudominio.com
|
||||
# Frontend - URL del backend en Dockploy
|
||||
VITE_API_URL=http://checklist-rons-0e8a3a-63dbc4-72-61-106-199.traefik.me
|
||||
|
||||
@@ -12,9 +12,12 @@ RUN npm install
|
||||
COPY . .
|
||||
|
||||
# Build argument para la URL de la API
|
||||
ARG VITE_API_URL
|
||||
ARG VITE_API_URL=http://localhost:8000
|
||||
ENV VITE_API_URL=$VITE_API_URL
|
||||
|
||||
# Mostrar la URL que se está usando (para debug)
|
||||
RUN echo "Building with VITE_API_URL=${VITE_API_URL}"
|
||||
|
||||
# Construir la aplicación
|
||||
RUN npm run build
|
||||
|
||||
|
||||
Reference in New Issue
Block a user