Bringing back the mongo build stage...
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-05-11 20:02:53 -04:00
parent 676124f23e
commit ca6a6a9ab3
3 changed files with 16 additions and 6 deletions

View File

@@ -1,3 +1,8 @@
## mongo build stage
FROM mongo:${MONGO_VERSION:-latest} AS database
WORKDIR /
COPY mongo-init.js ./docker-entrypoint-initdb.d/
## stage one, build the service
FROM node:20-alpine AS build
ENV NODE_ENV development
@@ -10,11 +15,11 @@ RUN yarn install
RUN yarn build
## this is stage two , where the app actually runs
FROM node:20-alpine AS auth-service
FROM node:20-alpine AS containerize
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 .
COPY --from=build /home/node/app/dist .
EXPOSE ${PORT:-9001}
CMD ["node","server/index.js"]