Initial commit

This commit is contained in:
Jonathan Ervine
2020-07-24 10:15:26 +08:00
parent b03171597b
commit 06faadb3a4
2 changed files with 55 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
FROM node:14.5.0-alpine3.12 as build-deps
WORKDIR /usr/src/build
COPY package*.json ./
COPY . .
RUN npm install && npm run build
FROM node:14.5.0-alpine3.12
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install --only=production
COPY --from=build-deps /usr/src/build/dist /usr/src/app/dist
COPY public/ ./public
ENV NODE_ENV "production"
EXPOSE 3000
CMD [ "node", "dist/server.js" ]