Initial commit

This commit is contained in:
2023-03-20 21:28:14 +02:00
commit 12ea0d49f5
8 changed files with 2033 additions and 0 deletions

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM node AS dev
# define /app as working directory
WORKDIR /app
# copy package.json and package-lock.json to /app
COPY package.json /app
COPY package-lock.json /app
# install node dependencies
RUN npm install
COPY . /app
# launch node server
ENTRYPOINT npm run dev
# production
# we will not use npm in production as it wants to write on the container filesystem. this should be prohibited on production. however, we need to allow it while developing.
FROM dev AS prod
RUN npm install --production
ENTRYPOINT node app.js