Initial rough working draft of v3

This commit is contained in:
Charlie Laabs
2021-12-19 16:59:13 -06:00
parent b777604bb3
commit 466c122dd2
27 changed files with 7581 additions and 1663 deletions

View File

@@ -1,8 +1,8 @@
########
# BASE
########
FROM keymetrics/pm2:12-alpine as base
WORKDIR /usr/src/markbot
FROM node:16-alpine3.14 as base
WORKDIR /usr/src/app
COPY package*.json ./
# Install build tools for erlpack, then install prod deps only, then remove build tools
@@ -25,23 +25,20 @@ RUN npm run build
########
# DEPLOY
########
FROM keymetrics/pm2:12-alpine as deploy
WORKDIR /usr/src/markbot
FROM node:16-alpine3.14 as deploy
WORKDIR /usr/src/app
ENV NPM_CONFIG_LOGLEVEL warn
# Steal node_modules from base image
COPY --from=base /usr/src/markbot/node_modules ./node_modules/
COPY --from=base /usr/src/app/node_modules ./node_modules/
# Steal compiled code from build image
COPY --from=build /usr/src/markbot/dist ./
COPY --from=build /usr/src/app/dist ./
# Copy package.json for version number
COPY package*.json ./
# Copy PM2 config
COPY ecosystem.config.js .
RUN mkdir config
# RUN ls -al