diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b20f50f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +# Ignore everything by default +* + +# Allow the public project files. +!src +!Dockerfile +!package*.json +!README.md \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ace90bf --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM node:16.6.1-alpine + +WORKDIR /opt/app +COPY package*.json ./ + +RUN npm ci --only=prod +COPY . . + +ENV NODE_ENV=production +ENV FILES_DIR=NULL + +CMD ["npm", "start"]