ZappyZap Posted July 21 Share Posted July 21 Overview: Support for Docker image Docmost Application Name: Docmost Application Site : https://docmost.com/ Application repository: https://github.com/docmost/docmost Documentation: https://docmost.com/docs/ Overview : Open-source collaborative wiki and documentation software Create, collaborate, and share knowledge seamlessly with Docmost. Ideal for managing your wiki, knowledge-base, documentation and a lot more. Make sure to look at the complete documentation Please post any questions/issues relating to this docker template you have in this thread. Quote Link to comment
Random.Name Posted July 22 Share Posted July 22 Hi, i tried your teamplate but it seems like i can't upload any images/ files in general to the docmost instance. Seems like a permission error for the data directory [Nest] 41 - 07/22/2024, 5:32:47 PM ERROR [AttachmentService] Error uploading file to drive: [Nest] 41 - 07/22/2024, 5:32:47 PM ERROR [AttachmentService] Error: Failed to upload file: EACCES: permission denied, mkdir '/app/data/storage/0190d976-fa88-799a-b7af-20c9e833a99d' [Nest] 41 - 07/22/2024, 5:32:47 PM ERROR [AttachmentController] BadRequestException: Error uploading file to drive the data directory is assigned to nobody:users as it should be, so i think its a problem with the container? Quote Link to comment
ZappyZap Posted July 22 Author Share Posted July 22 yes could be can give me the permission of the dir /mnt/apps/appdata/docmost/data i did not test this feature as i did not have any image of file while testing i will try to reproduce and get back Quote Link to comment
Elinor3 Posted August 25 Share Posted August 25 (edited) I've had a similar issue to Random.Name: [Nest] 42 - 08/25/2024, 4:04:24 PM LOG [NestFactory] Starting Nest application... [Nest] 42 - 08/25/2024, 4:04:25 PM LOG [DatabaseModule] Establishing database connection [Nest] 42 - 08/25/2024, 4:04:25 PM LOG [DatabaseModule] Database connection successful [Nest] 42 - 08/25/2024, 4:04:25 PM LOG [DatabaseMigrationService] No pending database migrations [Nest] 42 - 08/25/2024, 4:04:25 PM LOG [NestApplication] Nest application successfully started [Nest] 42 - 08/25/2024, 4:04:35 PM ERROR [AttachmentService] Error uploading file to drive: [Nest] 42 - 08/25/2024, 4:04:35 PM ERROR [AttachmentService] Error: Failed to upload file: EACCES: permission denied, mkdir '/app/data/storage/01918ae0-5027-79a2-ac0b-9f44b9970f7b' [Nest] 42 - 08/25/2024, 4:04:35 PM ERROR [AttachmentController] BadRequestException: Error uploading file to drive Permissions of that folder from the host machine (unraid): /mnt/user/appdata/docmost/data# ls -al total 0 drwxr-xr-x 1 nobody users 0 Aug 25 16:08 . drwxr-xr-x 1 nobody users 8 Aug 25 14:23 .. Permissions of that folder when connected to the Docmost container: docker exec -it Docmost bash c591c6413f6e:/app$ cd data c591c6413f6e:/app/data$ ls -al total 0 drwxr-xr-x 1 node node 14 Aug 7 21:06 . drwxr-xr-x 1 node node 146 Aug 7 21:06 .. drwxr-xr-x 1 99 users 0 Aug 25 20:08 storage Update #1: I see that the source Dockerfile sets the user this way: RUN chown -R node:node /app USER node Not sure the disconnect between that user (node:node), and this weird "99:users" being used to create the "storage" directory. I don't see any configuration details on Docmost's side that allows you to pass PUID/PGID, etc, like linuxservers docker images. Update #2: It seems that docmost's "node:node" expects to be PUID:PGID "1000:1000". I found this out by getting into the running Docmost container and running the "id" command: docker exec -it Docmost bash id uid=1000(node) gid=1000(node) groups=1000(node) Also, it sets up the `/app/data/storage` as a volume when the container starts (from further in the Dockerfile): VOLUME ["/app/data/storage"] I don't recall if it's possible to adjust the running Docker container user without modifying the Dockerfile itself. Edited August 25 by Elinor3 Quote Link to comment
Elinor3 Posted August 25 Share Posted August 25 I ended up solving it, but don't recommend it for others as it will have unknown consequences. Since my host machine (unraid) already had user id 1000 and group id 1000 taken, I thought I'd just modify that user and group to new user id (2000) and group (2000). groupmod -g 2000 old-group-name-here usermod -u 2000 some-user-name-here groupmod -g 1000 node usermod -u 1000 node cd /mnt/user/appdata/docmost chown -R node:node . docker restart Docmost Now I can upload files to a local storage. What we'll probably want to do is request changes to the source Dockerfile to set it up to allow different user:group that is customizable. Or, perhaps there's even an alternative to that that I'm just not familiar with. UID and GID stuff is not my strong suit (clearly). Quote Link to comment
ZappyZap Posted August 25 Author Share Posted August 25 2 minutes ago, Elinor3 said: What we'll probably want to do is request changes to the source Dockerfile to set it up to allow different user:group that is customizable. Or, perhaps there's even an alternative to that that I'm just not familiar with. UID and GID stuff is not my strong suit (clearly). I am not the one who build the image , it coming from the official project itself. I will check if there is a possibility, as i think it would be the best way... Quote Link to comment
Elinor3 Posted August 25 Share Posted August 25 (edited) Quote I am not the one who build the image , it coming from the official project itself. I am aware, and I was suggesting we'd need to talk with the Docmost authors. Probably via a new github issue: https://github.com/docmost/docmost/issues On that note, I did see a previous issue of someone else having this local storage issue with unraid: https://github.com/docmost/docmost/issues/111 I don't quite understand their solution, as it seems like someone suggested running this: sudo chown -R user:user ./path-to-docmost-data But I don't know how that would fix it unless the UID of user was 1000 and the GID of user was also 1000. But I could be missing some detail. On my machine I had different users assigned to 1000:1000, as I'd mentioned above. Edited August 25 by Elinor3 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.