Let's try this...
Some checks failed
continuous-integration/drone/push Build was killed

This commit is contained in:
2023-05-11 22:08:27 -04:00
parent 25688e1f03
commit 717e651cf9
2 changed files with 8 additions and 5 deletions

View File

@@ -1,6 +1,9 @@
ARG ENV=production
ARG MONGO_VERSION=latest
ARG PORT=9001
## mongo build stage ## mongo build stage
ARG MONGO_VERSION=${MONGO_VERSION} FROM mongo:${MONGO_VERSION} AS database
FROM mongo:${MONGO_VERSION:-latest} AS database
WORKDIR / WORKDIR /
COPY mongo-init.js ./docker-entrypoint-initdb.d/ COPY mongo-init.js ./docker-entrypoint-initdb.d/
@@ -17,10 +20,10 @@ RUN yarn build
## this is stage two , where the app actually runs ## this is stage two , where the app actually runs
FROM node:20-alpine AS containerize FROM node:20-alpine AS containerize
ENV NODE_ENV ${ENV:-production} ENV NODE_ENV ${ENV}
WORKDIR /home/node/app WORKDIR /home/node/app
COPY package*.json ./ COPY package*.json ./
RUN yarn install --frozen-lockfile --production RUN yarn install --frozen-lockfile --production
COPY --from=build /home/node/app/dist . COPY --from=build /home/node/app/dist .
EXPOSE ${PORT:-9001} EXPOSE ${PORT}
CMD ["node","server/index.js"] CMD ["node","server/index.js"]

View File

@@ -9,7 +9,7 @@ services:
context: . context: .
target: database target: database
args: args:
MONGO_VERSION: ${MONGO_VERSION} - MONGO_VERSION
networks: networks:
- docknet - docknet
volumes: volumes: