DEV Community

loading...

Discussion on: Dockerizing ReactJS, NodeJS, NGINX using Docker

Collapse
ndrean profile image
NDREAN

Hi. Why would you create the volumes ?

volumes:
      - '.:/app'
      - '/app/node_modules'
Enter fullscreen mode Exit fullscreen mode
Collapse
jairofernandez profile image
Jairo Alonso Fernández

for share code between local server and internal container, the /app/modules is for prevent rebuilding of container when we run a docker compose