So I have been trying to set it up, and it up and running but just default config. But I have things I havent managed to do.
I dont know if some of my question are affected by me trying to run it on Unraid, but anyway:
I tried protainer first but I am now only trying to use a docker compose plugin instead.
Worth noting that with other dockers I have used, I have used simple Unraid docker setup and not done docker compose myself.
Change storage location:
Default location do not store DB or more importantly, media, where I want it to be stored. I dont know exactly where its stored but seems like maybe its inside the docker file? (May be Unraid thing).
But the important part: I want to change where DB and media is stored, media is most important. and I havent gotten it to work. I have created a share(folder) where I want it to be.
Based on this: Server Configuration - Gramps Web (That is obviously written for people that know more about it than I do) In combination with looking at a few other websites (for it to at least make some sense), is this one correct way to do it?:
In the docker-compose.yml, add this line, add the last line here:
environment:
GRAMPSWEB_TREE: "Gramps Web" # will create a new tree if not exists
GRAMPSWEB_CELERY_CONFIG__broker_url: "redis://grampsweb_redis:6379/0"
GRAMPSWEB_CELERY_CONFIG__result_backend: "redis://grampsweb_redis:6379/0"
GRAMPSWEB_RATELIMIT_STORAGE_URI: redis://grampsweb_redis:6379/1
GRAMPSWEB_MEDIA_BASE_DIR: "/mnt/user/Gramps/Media"
But it doesnt work. Should it, or am I doing something wrong?
Make it available with reverse proxy questions
I see there is one setup for docker, and one with docker with Lets Encrypt.
The one with Lets Encrypt, it sounds like it includes Lets Encrypt, correct?
So If I already have an Lets Encrypt docker (SWAG from Linuxsever), I should use the Gramps Web one without Lets Encrypt, right?
Gramps Web dockers seem to be set to their own network(gramps_web_default). They would need to be on the same one I created for reverse proxy with my SWAG docker, right? How do I change the network Gramps Web docker uses when its created with docker compose?
Depends - when you’re running Gramps Web API in docker, you’ll have to set this variable to a path within your container and make sure that exists. Does it?
Then if you want it to be stored in a particular folder on your host, you would mount that folder into that directory inside your container.
“It does not work” is not terribly specific either. Have you converted media paths to relative in your Gramps tree, or are you starting with an empty one?
I am trying put it in a location in a host, as thats what dockers on Unraid usually do. For dockers that has a Unraid “docker template” or whatever its called, its usually partly done for me, just put a location in to a field in GUI, done. (One appdata folder and one share you specify yourself usually for data) Docker compose doesnt seem to work that way and Gramps web is by default using location that isnt recommended.
But now I have no idea what to do to change it to store things like other dockers I have do then if it isnt that.
I ment not working as in the files arent stored where I want them to be stored.
I am using an already existing tree, but if could figure out how to move both the database and the media to the same folder, it wouldnt matter as they are still relative to eachother the same way.
Sorry, I didn’t really understand what you mean, but it’s straightforward in docker-compose to mount volumes from the host, and also not difficult to move files from one volume to another - just exec into a shell inside the container and cp the files. All of this is not really Gramps Web specific though.
“straight forward”, “not difficult”
Maybe for people that have done it before havent, so its not. Especially not if you dont know where too look to find out how.
These sorts of experiential knowledge in tools are good items to pass through ai prompts to explain. AIs will undoubtedly send users off in the “wild goose chase”… sometimes frequently.
If the knowledge is not Gramps Web specific, let’s try to take the tutoring burden off of David.
For example, the prompt in Perplexity.ai
Please please suggest online sources for introducing the worflows described the following comment: “it’s straightforward in docker-compose to mount volumes from the host, and also not difficult to move files from one volume to another - just exec into a shell inside the container and cp the files. All of this is not really Gramps Web specific though.”
Returns:
To introduce the workflows described in that comment, here are some helpful online resources:
Mounting volumes from the host in docker-compose:
Docker’s official documentation provides a clear explanation of how to use volumes in docker-compose, including mounting host directories[2]. The guide shows how to define volumes in the docker-compose.yml file and mount them to containers[2].
Executing into a shell inside a container:
Docker’s documentation also covers how to use the “docker exec” command to run a command in a running container[1]. This allows you to open a shell inside the container and perform operations like copying files.
Copying files between volumes:
Once you’ve accessed a shell inside the container, you can use standard Linux commands like “cp” to move files between mounted volumes. The StackOverflow post demonstrates how to mount host directories as volumes, which would allow you to access and manipulate files[1].
General Docker volume management:
Kinsta’s blog post provides a comprehensive overview of using volumes in Docker Compose, including creating, mounting, and sharing volumes between containers[3]. This resource offers a broader understanding of volume management in Docker.
These sources cover the key aspects mentioned in the comment - mounting host volumes, accessing containers, and manipulating files within volumes - all within the context of Docker and Docker Compose[1][2][3].