Replies: 1 comment
-
I would also find this helpful! Just ran into it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
first of all, I would like to thank you for this application. I installed it on my server and noticed that the Affine container (and Node application) is running as root:root.
So I tried to reduce permissions and change the user to node:node, which is already defined in the Node images that you use as a base image (FROM node:22-bookworm-slim).
The main issue I ran into was that /app/src/schema.gql is owned by root:root, so the Node application is unable to update the file when running as the node user.
I would like to suggest making the image more secure by altering the Dockerfile as follows:
The main problem is that existing installations are owned by root:root, and the storage/config is mounted at /root/.affine/..., which would also need to be manually fixed by users.
If you consider this change too "breaking", I would at least suggest fixing the ownership issue so that users can run the container with a non-root user without encountering startup errors. 😄
Here’s an example of what happens when running the container as the node user without fixing the permissions:
Any suggestions here? I’d be happy to open a PR if you think this change would be helpful.
Beta Was this translation helpful? Give feedback.
All reactions