API URL was not taken from environment after docker container and npm was build

CORS prevented from loading
This commit is contained in:
2026-01-01 14:02:38 +01:00
parent 8c7aa86181
commit 7eb44a7ae6
10 changed files with 3911 additions and 7 deletions
+10
View File
@@ -1,6 +1,16 @@
# =========== 1) Build stage ===========
FROM node:22-alpine AS build
# Accept build arguments for Vite environment variables
ARG VITE_API_URL
ARG VITE_BASE_URL
ARG VITE_API_PORT
# Set them as environment variables for the build process
ENV VITE_API_URL=$VITE_API_URL
ENV VITE_BASE_URL=$VITE_BASE_URL
ENV VITE_API_PORT=$VITE_API_PORT
WORKDIR /usr/src/app
# Copy package files