initial project setup

This commit is contained in:
2022-09-29 15:46:33 +02:00
commit 6c666b555f
12 changed files with 6295 additions and 0 deletions

48
Dockerfile Normal file
View File

@@ -0,0 +1,48 @@
# ################################################################
# ### Base image ###
# ################################################################
FROM node:16-alpine as base
WORKDIR /app
COPY . .
ARG NODE_ENV=production
ENV NODE_ENV ${NODE_ENV}
# ################################################################
# ### development image ###
# ################################################################
FROM base as development
WORKDIR /app
RUN npm install --quiet --unsafe-perm --no-progress --no-audit --include=dev
CMD npm run run:dev
# ################################################################
# ### backend build image ###
# ################################################################
FROM base as backendbuild
WORKDIR /app
RUN npm install --quiet --unsafe-perm --no-progress --no-audit --include=dev
RUN npx tsc -p ./tsconfig.json
# ################################################################
# ### production image ###
# ################################################################
FROM base as production
COPY --from=backendbuild --chown=node:node /app/dist/ /app/dist/
WORKDIR /app
RUN npm install --quiet --unsafe-perm --no-progress --no-audit --omit=dev
CMD npm run run:prod