create development docker image
This commit is contained in:
parent
2e624e6f6f
commit
f07a961075
|
@ -10,12 +10,8 @@ ENV PATH /usr/src/app/node_modules/.bin:$PATH
|
|||
## install and cache app dependencies
|
||||
COPY package.json /usr/src/app/package.json
|
||||
|
||||
## create user "node" and give permissions
|
||||
RUN chown -R node:node . && chmod -R 755 .
|
||||
USER node
|
||||
|
||||
# install app dependencies
|
||||
RUN npm install
|
||||
RUN npm install --silent
|
||||
|
||||
## start app
|
||||
CMD ["npm", "start"]
|
|
@ -3,13 +3,17 @@ version: '3.7'
|
|||
services:
|
||||
reactive-resume:
|
||||
container_name: reactive-resume
|
||||
tty: true
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
volumes:
|
||||
- '.:/usr/src/app'
|
||||
- '/usr/src/app/node_modules'
|
||||
expose:
|
||||
- '3001'
|
||||
ports:
|
||||
- '3001:3000'
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
- CHOKIDAR_USEPOLLING=true
|
Loading…
Reference in New Issue