Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:11.1.0

RUN useradd --user-group --create-home --shell /bin/false app &&\
npm install --global npm@6.4.1 && npm install -g nodemon

ENV HOME=/home/app

COPY --chown=app:app package.json npm-shrinkwrap.json $HOME/board/

USER app
WORKDIR $HOME/board
RUN npm cache verify && npm install --silent --progress=false

USER root
COPY --chown=app:app . $HOME/board

USER app

CMD ["npm","start"]
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: "2"
services:
board:
build:
context: .
dockerfile: Dockerfile
command: /usr/local/bin/nodemon --exec npm start
environment:
NODE_ENV: development

ports:
- 3000:3000
volumes:
- .:/home/app/board
- /home/app/board/node_modules
Loading