Skip to content

Commit

Permalink
fix: add git and optimize dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinKolarik committed Jan 23, 2024
1 parent 2973d59 commit 6a5579a
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
FROM node:18-bullseye-slim
RUN apt-get update -y && apt-get install tini util-linux curl -y
FROM node:18-bullseye-slim AS builder
RUN apt-get update -y && apt-get install util-linux curl git -y

ENV NODE_ENV production

COPY . /app
ADD package.json package-lock.json /app/
WORKDIR /app
RUN npm ci --include=dev
COPY . /app
RUN npm run build

FROM node:18-bullseye-slim
RUN apt-get update -y && apt-get install tini util-linux curl -y

ENV NODE_ENV production

ADD package.json package-lock.json /app/
WORKDIR /app
RUN npm ci
COPY . /app
COPY --from=builder /app/dist /app/dist
COPY --from=builder /app/data /app/data

ENV PORT=80
EXPOSE 80
ENTRYPOINT ["/usr/bin/tini", "--"]
Expand Down

0 comments on commit 6a5579a

Please sign in to comment.