Skip to content

Commit 445d242

Browse files
author
AlessGarau
committed
fix: prod value
1 parent f2ab727 commit 445d242

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Docker/Dockerfile.client.prod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ RUN --mount=type=cache,id=npm,target=/root/.npm \
1111
fi
1212

1313
FROM base AS build
14+
ARG VITE_API_URL
15+
ENV VITE_API_URL=${VITE_API_URL}
1416
WORKDIR /app
1517
COPY packages/client/package*.json ./
1618
COPY packages/client/tsconfig*.json ./

Docker/docker-compose.prod.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
services:
22
smart-class-server-prod:
33
image: ${DOCKERHUB_USERNAME}/smart-class-server:latest
4-
expose:
5-
- "3000"
4+
ports:
5+
- "3000:3000"
66
restart: always
77
environment:
88
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@smart-class-db-prod:5432/${POSTGRES_DB}
@@ -25,9 +25,11 @@ services:
2525

2626
smart-class-client-prod:
2727
image: ${DOCKERHUB_USERNAME}/smart-class-client:latest
28-
expose:
29-
- "5173"
28+
ports:
29+
- "80:80"
3030
restart: always
31+
environment:
32+
- VITE_API_URL=https://06.hetic.arcplex.dev:3000
3133
networks:
3234
- smart-class-network
3335

packages/server/src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const setupServer = async () => {
2929
});
3030

3131
await server.register(fastifyCors, {
32-
origin: ["http://localhost:5173", "http://smart-class-client-dev:5173"],
32+
origin: ["http://localhost:5173", "http://smart-class-client-dev:5173", "https://06.hetic.arcplex.dev:3000"],
3333
credentials: true,
3434
});
3535

0 commit comments

Comments
 (0)