Add Dockerfile template
This commit is contained in:
parent
712c1a3c9a
commit
3c3a787ad7
|
@ -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"]
|
|
@ -170,6 +170,7 @@ if has ("autocmd")
|
||||||
autocmd BufNewFile *.js 0r ~/.vim/templates/skeleton.js
|
autocmd BufNewFile *.js 0r ~/.vim/templates/skeleton.js
|
||||||
autocmd BufNewFile *.json 0r ~/.vim/templates/skeleton.json
|
autocmd BufNewFile *.json 0r ~/.vim/templates/skeleton.json
|
||||||
autocmd BufNewFile Makefile 0r ~/.vim/templates/Makefile
|
autocmd BufNewFile Makefile 0r ~/.vim/templates/Makefile
|
||||||
|
autocmd BufNewFile Dockerfile 0r ~/.vim/templates/Dockerfile
|
||||||
augroup END
|
augroup END
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue