housekeeping

This commit is contained in:
waveringana 2022-12-02 13:59:50 +00:00
parent 462d388b15
commit eca5e3c841
31 changed files with 1259 additions and 1259 deletions

12
docker/.dockerignore Normal file
View file

@ -0,0 +1,12 @@
.env
var
uploads
# Node.js
node_modules/
npm-debug.log*
# Mac OS X
.DS_Store
Dockerfile

22
docker/Dockerfile Normal file
View file

@ -0,0 +1,22 @@
FROM node:16-alpine AS BUILD_IMAGE
RUN apk add curl
RUN curl -sf https://gobinaries.com/tj/node-prune | sh
COPY package*.json ./
RUN npm install
RUN npm prune --production
RUN /usr/local/bin/node-prune
FROM node:16-alpine
COPY --from=BUILD_IMAGE /node_modules ./node_modules
COPY /app ./app
COPY package*.json ./
ENV NODE_ENV=production
RUN node /app/db.js
CMD ["npm", "start"]