This commit is contained in:
@@ -4,11 +4,13 @@ ARG PORT=9001
|
|||||||
|
|
||||||
## mongo build stage
|
## mongo build stage
|
||||||
FROM mongo:$MONGO_VERSION AS database
|
FROM mongo:$MONGO_VERSION AS database
|
||||||
|
RUN apt update && apt install git
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
COPY mongo-init.js ./docker-entrypoint-initdb.d/
|
COPY mongo-init.js /docker-entrypoint-initdb.d
|
||||||
|
|
||||||
## stage one, build the service
|
## stage one, build the service
|
||||||
FROM node:20-alpine AS build
|
FROM node:20-alpine AS build
|
||||||
|
RUN apk update && apk add git
|
||||||
ENV NODE_ENV development
|
ENV NODE_ENV development
|
||||||
WORKDIR /home/node/app
|
WORKDIR /home/node/app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
@@ -20,6 +22,7 @@ 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
|
||||||
|
RUN apk update && apk add git
|
||||||
ENV NODE_ENV $ENV
|
ENV NODE_ENV $ENV
|
||||||
WORKDIR /home/node/app
|
WORKDIR /home/node/app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
|||||||
Reference in New Issue
Block a user