This repository has been archived on 2023-05-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
auth/Dockerfile
mifi ebf0c6d970
All checks were successful
continuous-integration/drone/push Build is passing
Some crazy shit right here... mongo in the Dockerfile
2023-05-10 13:09:30 -04:00

25 lines
603 B
Docker

FROM mongo:latest AS auth-service_mongo
ENV NODE_ENV development
WORKDIR /docker-entrypoint-initdb.d
COPY mongo-init.js ./
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"]