Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# from: https://github.com/Saluki/nestjs-template
FROM node:20-alpine as builder
FROM node:20-alpine AS dev

ENV NODE_ENV build
ENV NODE_ENV=build

RUN npm install -g nest eslint jest

Expand All @@ -12,8 +12,7 @@ USER node
# ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
# ENV PATH=$PATH:/home/node/.npm-global/bin

RUN mkdir -p /tmp/os2iot/backend
WORKDIR /tmp/os2iot/backend
WORKDIR /app

COPY --chown=node:node package*.json ./

Expand All @@ -25,6 +24,6 @@ RUN npm run build

CMD ["npm", "run", "start:dev"]

FROM builder as prod
FROM dev AS prod

CMD ["npm", "run", "start:prod"]