diff --git a/.idea/workspace.xml b/.idea/workspace.xml index f7d774d..9213a84 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,9 +4,7 @@ - @@ -452,6 +457,7 @@ - \ No newline at end of file diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index d34e7d3..00832d3 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -20,9 +20,10 @@ COPY shared ./shared # Build the app WORKDIR /app/apps/web -# We need VITE_API_BASE_URL at build time for SvelteKit static replacements if any, -# but usually it's better to use dynamic env vars if possible. -# For now, let's assume it can be provided during build or we use the default. +ARG VITE_API_BASE_URL +ARG ORIGIN +ENV VITE_API_BASE_URL=$VITE_API_BASE_URL +ENV ORIGIN=$ORIGIN RUN npm run build # --- diff --git a/docker-compose.yml b/docker-compose.yml index 8c1543e..3f7afc5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,6 +38,9 @@ services: build: context: . dockerfile: apps/web/Dockerfile + args: + VITE_API_BASE_URL: ${VITE_API_BASE_URL:-http://localhost:3000} + ORIGIN: ${WEB_ORIGIN:-http://localhost:5173} container_name: hotdesking_web restart: unless-stopped ports: