Add dockerfile and dockerignore

This commit is contained in:
Lucian Popescu 2022-04-15 18:07:05 +03:00
parent 5b97629c0a
commit 2bd633f596
2 changed files with 21 additions and 0 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
node_modules
npm-debug.log
README.md

View File

@ -0,0 +1,18 @@
FROM node:16
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available ([email protected]+)
COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
# Bundle app source
COPY . .
EXPOSE 3000
CMD [ "npm", "start" ]