Add Dockerfile template

This commit is contained in:
Sage Vaillancourt 2024-01-20 19:10:18 -05:00
parent 712c1a3c9a
commit 3c3a787ad7
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,18 @@
FROM node:alpine
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
RUN mkdir -p /secrets && chown -R node:node /secrets
WORKDIR /home/node/app
COPY package*.json ./
USER node
RUN npm ci
COPY --chown=node:node . .
EXPOSE 3001
CMD ["npm", "start"]

View File

@ -170,6 +170,7 @@ if has ("autocmd")
autocmd BufNewFile *.js 0r ~/.vim/templates/skeleton.js
autocmd BufNewFile *.json 0r ~/.vim/templates/skeleton.json
autocmd BufNewFile Makefile 0r ~/.vim/templates/Makefile
autocmd BufNewFile Dockerfile 0r ~/.vim/templates/Dockerfile
augroup END
endif