Why so many volumes? #478
-
Hello! Gramps is a fantastic application. I have been self-hosting an HTML export of my tree for years and I'm excited to see an official hosted solution with docker. Thank you! Is it safe/possible to use fewer volume mounts? Per docker-compose.yml there's 8 volumes, 6 of which are subdirectories of Would it be bad to simply mount a Is mounting I'd love for a single volume to backup/restore, relocate as needed. If *I see |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
Hi! Thanks for the nice words. You can use less volumes if you like - the main reason for splitting them was actually that not all of them are equally relevant for a backup.
Yep, that would be bad, because
It's necessary, yes, because that's how the Web API container and the Celery container share temporary files (e.g., the celery container creates an export and the flask container serves it). Using redis for that doesn't make sense - imagine generating a media archive ZIP, which can be GB in size.
It's still possible. Nothing stops you from changing the config as well, see https://www.grampsweb.org/Configuration/. Then you can move media, search index, and Gramps database into the same folder. However it might require you to create some subdirectories which are not present in the image yet, so not 100% sure it's possible without creating your own image or modifying the entrypoint. If you want to move the Gramps database away from |
Beta Was this translation helpful? Give feedback.
-
Ah, there is a lot in Have you considered moving gunicorn and celery into the same container with init/tini? It would eliminate the tmp volume, but it may be useful to keep them separate for scaling. |
Beta Was this translation helpful? Give feedback.
-
I haven't, and think it's cleaner to keep them separate. |
Beta Was this translation helpful? Give feedback.
-
After gramps-project/gramps-web-api#538, my docker-compose.yml is down to two mounts, and the whole instance seems to have survived simply Not included: Bonus: this works as non-root. After
|
Beta Was this translation helpful? Give feedback.
-
It seems to me that all hell breaks loose right at the start (installing 3GB of dependencies right away) |
Beta Was this translation helpful? Give feedback.
Hi! Thanks for the nice words.
You can use less volumes if you like - the main reason for splitting them was actually that not all of them are equally relevant for a backup.
Yep, that would be bad, because
/app
contains the source code for Web API: https://github.com/gramps-project/gramps-web-api/blob/master/Dockerfile#L67It's necessary, yes, because that's how the Web API container and the Celery container share temporary files (e.g., the celery container creates an export and the flask container serves it). Using redis for that doesn't make sense - imagine generating a media archive ZIP, which can be…