Skip to content

Commit 3af9539

Browse files
Create Docker
1 parent caae364 commit 3af9539

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

frontend/Docker

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# ---------- Frontend Dockerfile ----------
2+
FROM node:20-alpine
3+
WORKDIR /app
4+
5+
# Copy dependencies first
6+
COPY package*.json ./
7+
8+
# Install with legacy peer deps to skip version conflict
9+
RUN npm install --legacy-peer-deps
10+
11+
# Copy the app source code
12+
COPY . .
13+
14+
# Build the frontend (Vite)
15+
RUN npm run build
16+
17+
# Serve the built app
18+
RUN npm install -g serve
19+
CMD ["serve", "-s", "dist"]
20+
21+
EXPOSE 3000

0 commit comments

Comments
 (0)