mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-24 15:49:42 +02:00
* update config-loader and remove unnecessary packages * implement default config && move password to auth section * add 'v' to the start of image name * fix dockerfile * test * test pipeline * test again * fixes * remove test step * remove console log * fix default config
33 lines
678 B
Text
33 lines
678 B
Text
# Stage 1 - build
|
|
FROM node:16.14.0-alpine3.15 as build
|
|
|
|
## Install build toolchain, install node deps and compile native add-ons
|
|
RUN apk add --no-cache python3 make g++ git
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY package.json yarn.lock ./
|
|
|
|
RUN yarn install --production
|
|
|
|
RUN cp -R node_modules prod_node_modules
|
|
|
|
RUN yarn install
|
|
|
|
COPY . .
|
|
|
|
RUN yarn build-all
|
|
|
|
# Stage 2 - make final image
|
|
FROM node:16.14.0-alpine3.15
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY package.json yarn.lock ./
|
|
COPY --from=build /usr/src/app/prod_node_modules ./node_modules
|
|
COPY --from=build /usr/src/app/dist ./dist
|
|
COPY --from=build /usr/src/app/public ./public
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
CMD ["node", "dist/backend/app.js"]
|