adonisjs / v5-docs

📚 Source code and documentation for the official docs website.
https://v5-docs.adonisjs.com
88 stars 138 forks source link

Docker compose volume issue #142

Closed careless10 closed 2 years ago

careless10 commented 2 years ago

I noticed that whenever im working on macOS the docker-compose, argon2 and bcrypt issues arise turned out

volumes:
     - ./:/home/node/app

is linking the container to the node_modules on the host so

     - /home/node/app/node_modules

adding this will exclude the node_modules usage from host, and creates an anonymous volume that holds the node_modules, thought it solves the issue, what its doing actually is creating a new "node_modules" which means we end up with 3 places with node_modules, not a very pretty solution,

Sadly this solution needs an image rebuild each time the package.json is updated

Reference: https://burnedikt.com/dockerized-node-development-and-mounting-node-volumes/