This reverts commit 43dcdf4e6a.
This commit is contained in:
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
## stage one, build the service
|
||||
FROM node:20-alpine AS build
|
||||
ENV NODE_ENV development
|
||||
WORKDIR /home/node/app
|
||||
COPY package*.json ./
|
||||
COPY tsconfig.json ./
|
||||
COPY lib ./lib
|
||||
RUN ls -a
|
||||
RUN yarn install
|
||||
RUN yarn build
|
||||
|
||||
## this is stage two , where the app actually runs
|
||||
FROM node:20-alpine AS auth-service
|
||||
ENV NODE_ENV ${ENV:-production}
|
||||
WORKDIR /home/node/app
|
||||
COPY package*.json ./
|
||||
RUN yarn install --frozen-lockfile --production
|
||||
COPY --from=0 /home/node/app/dist .
|
||||
EXPOSE ${PORT:-9001}
|
||||
CMD ["node","server/index.js"]
|
||||
Reference in New Issue
Block a user