diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 5ed7019..72d4449 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,7 +4,16 @@
-
+
+
+
+
+
+
+
+
+
+
@@ -66,7 +75,7 @@
]
}
}
-
+
@@ -103,9 +112,9 @@
+
-
@@ -125,7 +134,7 @@
1774643312599
-
+
@@ -383,7 +392,23 @@
1774720187941
-
+
+
+ 1774720441331
+
+
+
+ 1774720441331
+
+
+
+ 1774720600350
+
+
+
+ 1774720600350
+
+
@@ -401,8 +426,6 @@
-
-
@@ -426,6 +449,8 @@
-
+
+
+
\ No newline at end of file
diff --git a/apps/api/Dockerfile b/apps/api/Dockerfile
index 74a634b..b3930ff 100644
--- a/apps/api/Dockerfile
+++ b/apps/api/Dockerfile
@@ -20,7 +20,6 @@ COPY shared ./shared
# Generate Prisma client
WORKDIR /app/apps/api
-COPY apps/api/prisma.config.ts ./
RUN npx prisma generate
# Build the app
@@ -36,7 +35,6 @@ COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/apps/api/dist ./apps/api/dist
COPY --from=builder /app/apps/api/package.json ./apps/api/package.json
COPY --from=builder /app/apps/api/prisma ./apps/api/prisma
-COPY --from=builder /app/apps/api/prisma.config.ts ./apps/api/prisma.config.ts
COPY --from=builder /app/shared/dist ./shared/dist
COPY --from=builder /app/shared/package.json ./shared/package.json
diff --git a/apps/api/package.json b/apps/api/package.json
index 88aeee5..0c54712 100644
--- a/apps/api/package.json
+++ b/apps/api/package.json
@@ -84,5 +84,8 @@
],
"coverageDirectory": "../coverage",
"testEnvironment": "node"
+ },
+ "prisma": {
+ "seed": "ts-node prisma/seed.ts"
}
}
diff --git a/apps/api/prisma.config.ts b/apps/api/prisma.config.ts
deleted file mode 100644
index 9e03e88..0000000
--- a/apps/api/prisma.config.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { defineConfig } from 'prisma/config';
-
-export default defineConfig({
- seed: {
- command: 'ts-node prisma/seed.ts',
- },
-});
diff --git a/apps/api/src/main.ts b/apps/api/src/main.ts
index 3f22284..489a960 100644
--- a/apps/api/src/main.ts
+++ b/apps/api/src/main.ts
@@ -18,7 +18,7 @@ async function bootstrap() {
app.useGlobalFilters(new HttpExceptionFilter());
app.enableCors({
- origin: ['http://localhost:5173'],
+ origin: process.env.CORS_ORIGIN ? process.env.CORS_ORIGIN.split(',') : ['http://localhost:5173'],
credentials: true,
});
diff --git a/docker-compose.yml b/docker-compose.yml
index cf1331f..8c1543e 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -29,6 +29,7 @@ services:
DATABASE_URL: "postgresql://${DB_USER:-postgres}:${DB_PASSWORD:-postgres}@postgres:5432/${DB_NAME:-hotdesking}"
PORT: 3000
JWT_SECRET: ${JWT_SECRET:-super-secret-change-me}
+ CORS_ORIGIN: ${WEB_ORIGIN:-http://localhost:5173}
depends_on:
postgres:
condition: service_healthy