Skip to content

Commit 57e9002

Browse files
committed
fix: add git and optimize dockerfile
1 parent 2973d59 commit 57e9002

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

Diff for: Dockerfile

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
1-
FROM node:18-bullseye-slim
2-
RUN apt-get update -y && apt-get install tini util-linux curl -y
1+
FROM node:18-bullseye-slim AS builder
2+
RUN apt-get update -y && apt-get install util-linux curl git -y
33

44
ENV NODE_ENV production
55

6-
COPY . /app
6+
ADD package.json package-lock.json /app/
77
WORKDIR /app
88
RUN npm ci --include=dev
9+
COPY . /app
910
RUN npm run build
1011

12+
FROM node:18-bullseye-slim
13+
RUN apt-get update -y && apt-get install tini util-linux curl -y
14+
15+
ENV NODE_ENV production
16+
17+
ADD package.json package-lock.json /app/
18+
WORKDIR /app
19+
RUN npm ci
20+
COPY . /app
21+
COPY --from=builder /app/dist /app/data /app/
22+
1123
ENV PORT=80
1224
EXPOSE 80
1325
ENTRYPOINT ["/usr/bin/tini", "--"]

0 commit comments

Comments
 (0)