Skip to content

Commit 3f4e976

Browse files
committed
frontend docker file changed
1 parent 9a5495c commit 3f4e976

4 files changed

Lines changed: 10 additions & 13 deletions

File tree

Client/DockerFile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# 1️⃣ Build stage
2-
FROM node:20 AS builder
3-
1+
# Stage 1: build
2+
FROM node:20 AS build
43
WORKDIR /app
54

65
COPY package*.json ./
@@ -9,15 +8,12 @@ RUN npm install
98
COPY . .
109
RUN npm run build
1110

12-
# 2️⃣ Serve stage
13-
FROM node:20-alpine
14-
11+
# Stage 2: serve
12+
FROM node:20
1513
WORKDIR /app
16-
1714
RUN npm install -g serve
1815

19-
COPY --from=builder /app/dist ./dist
16+
COPY --from=build /app/dist ./dist
2017

2118
EXPOSE 3000
22-
23-
CMD ["serve", "-s", "dist", "-l", "3000"]
19+
CMD ["serve", "-s", "dist", "-l", "3000"]

Client/src/api/auth.api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import axios from "axios";
22
import type { LoginDto, RegisterDto, User } from "../types";
33

44
const api = axios.create({
5-
baseURL: `${import.meta.env.VITE_API_URL}/api/auth`,
5+
baseURL: import.meta.env.Vite_API_URL || "http://localhost:3000/api/auth",
66
withCredentials: true,
77
});
88

Client/src/api/document.api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import axios from "axios";
22

33
const api = axios.create({
4-
baseURL: `${import.meta.env.VITE_API_URL}/api`,
4+
baseURL: import.meta.env.VITE_API_URL || "http://localhost:3000/api",
55
withCredentials: true,
66
});
77

Client/src/api/workspace.api.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ export interface CreateWorkspaceDto {
4040
}
4141

4242
const api = axios.create({
43-
baseURL: `${import.meta.env.VITE_API_URL}/api/workspace`,
43+
baseURL:
44+
import.meta.env.VITE_API_URL || "http://localhost:3000/api/workspace",
4445
withCredentials: true,
4546
});
4647

0 commit comments

Comments
 (0)