From 94709d86d77449298fed01c1aa5af9dd8deba216 Mon Sep 17 00:00:00 2001 From: Pau Costa Date: Sat, 28 Mar 2026 19:26:40 +0100 Subject: [PATCH] Add Asset table, extend schema for related entities, and update .env setup - Create `Asset` table with relevant columns and constraints. - Extend `Organization`, `Building`, `Floor`, `Space`, and `User` tables with new fields referencing `Asset`. - Add `Reservation` table with foreign key constraints for users and spaces. - Introduce `.env.example` for environment variable management. - Update `DOCKER_SETUP.md` with initialization and environment configuration instructions. --- .idea/workspace.xml | 20 +++++++++++++------- apps/web/Dockerfile | 7 ++++--- docker-compose.yml | 3 +++ 3 files changed, 20 insertions(+), 10 deletions(-) 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: