kitsteam / stop-motion-app

GNU Affero General Public License v3.0
4 stars 1 forks source link

node_modules is created as root:root #209

Open sorenjohanson opened 1 week ago

sorenjohanson commented 1 week ago

With a fresh clone of the repository and when executing docker compose up -d for the first time, node_modules seems to be created with root:root permissions. This prevents yarn install from executing successfully as it's run with the node user.

Not sure if this is a local issue, but once node_modules is created in the local file system, it's possible to work around the issue by setting the correct permissions locally (in my case, cert:cert) and forcibly re-creating the Docker container using docker compose up -d --build --force-recreate. The node_modules folder is then created/copied with the correct permissions.

sorenjohanson commented 6 days ago

This is most likely caused by (accidentally) overwriting node_modules created by the Dockerfile in docker-compose.yml:

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