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
I noticed that whenever im working on macOS the docker-compose, argon2 and bcrypt issues arise turned out
is linking the container to the node_modules on the host so
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/