comunica / jQuery-Widget.js

🖼 A jQuery widget to query heterogeneous interfaces using Comunica SPARQL
http://query.linkeddatafragments.org/
MIT License
19 stars 34 forks source link

#129: Run node as non-root user #130

Closed MPParsley closed 2 years ago

MPParsley commented 2 years ago

Fixes #129.

Still requires nginx to run as non-root. See https://www.rockyourcode.com/run-docker-nginx-as-non-root-user/

rubensworks commented 2 years ago

Thanks for this @MPParsley!

Since the CI here doesn't build the Dockerfile, can you confirm that it builds+runs ok on your end?

MPParsley commented 2 years ago

@rubensworks, added the nginx user. This required removing the user statement from the default nginx config so it has been added here as well.

nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:2

This allows further configuration of nginx.

Alternatively, we could strip it out from the default config:

sed -i '/^user/d' /etc/nginx/nginx.conf

I can confirm this has been tested (build+run).

MPParsley commented 2 years ago

@rubensworks, opened a PR with the other approach in #131. Both have been tested.

rubensworks commented 2 years ago

Thanks so much for this @MPParsley!