Bringing back the mongo build stage...
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user