Skip to content

Commit 7f30c04

Browse files
committed
chore: Add dockerfiles to both client and server
1 parent 2f1ee50 commit 7f30c04

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

client/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# build stage
2+
FROM node:20-alpine AS build
3+
WORKDIR /app
4+
COPY package*.json ./
5+
RUN npm ci
6+
COPY . .
7+
RUN npm run build
8+
9+
# production stage
10+
FROM nginx:alpine
11+
COPY --from=build /app/build /usr/share/nginx/html
12+
EXPOSE 80
13+
CMD ["nginx", "-g", "daemon off;"]

server/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM node:20-alpine
2+
WORKDIR /app
3+
COPY package*.json ./
4+
RUN npm ci
5+
COPY . .
6+
EXPOSE 3000
7+
CMD ["npm", "start"]

0 commit comments

Comments
 (0)