Skip to content

Commit 5979f1f

Browse files
authored
added dockerfile
1 parent 5b72bdf commit 5979f1f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

frontend/Dockerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
FROM node:19-alpine AS dependencies
2+
RUN apk add --no-cache libc6-compat git
3+
WORKDIR /home/app
4+
COPY .npmrc ./
5+
COPY package.json ./
6+
COPY package-lock.json ./
7+
RUN npm install
8+
#
9+
FROM node:19-alpine AS builder
10+
WORKDIR /home/app
11+
RUN apk add --no-cache libc6-compat git
12+
COPY --from=dependencies /home/app/node_modules ./node_modules
13+
COPY . .
14+
ARG NODE_ENV=production
15+
ENV NODE_ENV=${NODE_ENV}
16+
RUN npm run build
17+
#
18+
FROM node:19-alpine AS runner
19+
RUN apk add --no-cache curl
20+
WORKDIR /app
21+
ARG NODE_ENV=production
22+
ENV NODE_ENV=${NODE_ENV}
23+
#
24+
COPY --from=builder /home/app/ .
25+
#EXPOSE 3000
26+
#ENV PORT 3000
27+
#
28+
CMD ["node", "standalone/server.js"]
29+
#

0 commit comments

Comments
 (0)