-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
generate
option of docker image lacks a way to specify the data path
#4830
Comments
It looks like the docker container wants to use |
by default, the media store is put in a |
That's exactly what I mean, I completely forgot how it works. Disregard 👍 |
Is it not possible to just simply allow the user to map I even went as far as copying over some lines from the "normal" |
@relink2013 of course that's fine. The point is just that the defaults in the generated file should be sensible and not require you to edit them. |
Hey everyone, is there a way to make this work with docker-compose? Forgive me if I don't understand.... isn't setting the entrypoint to a chown command overriding it? If I set "entrypoint: chown 901:901 /data", the container just exits with code 0, I think cause it just executes the chown and the container does nothing. I generated my own homeserver.yaml and corrected the "media_store" path to /data/media_store. How exactly would I fix the permissions for the container while still maintaining the existing "start.py" entrypoint? And sorry if this is real obvious, but how does overriding the entrypoint help? Can you somehow edit that for the container after it runs and does the chown? |
I tried to use docker-compose to setup, but didn't work out of the box. The following steps worked for me:
Notes:
|
Thanks for the reply! You got the right idea. Trying to modify the entrypoint and/or the docker file is a roundabout way of attempting to fix the permissions. And for some reason this issue and the linked issue have fixes that think the group:user is 901. Through trial and error, I figured out the same thing:" fix the homeserver.yaml's path references and the log config, and chown the data folder to 991:991. Back to the original issue, I believe it would be more friendly for the generate command to allow you to specify the data path. The bigger issue is when you run it via docker and it doesn't setup the permissions for you. |
I have the same problem. I can start the server without an persistent configuration-file. If I use the generate-command with the config-environment-variable, it generates a config-file but the container doesnt start anymore. I need this configuration file to change, because I want to connect the matrix-server to my Active Directory. I tried to change the values you told us, but it doesnt help at all. |
fixed by #5563 .
This is unrelated to this issue... |
I just ran into this error, it tried to rec_walk my entire filesystem. It should probably be reopened, at least until the docker-compose.yml is updated. |
this issue is unrelated to docker-compose as far as I am aware. The fix is in the v1.1.0 images. |
To fix that, got into your container with : > docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c90fcf8192af vectorim/riot-web:develop "nginx -g 'daemon of…" 23 hours ago Up 23 hours 80/tcp chat_web.1.vie63blf7kmvohextk3733ome
5da798b100bd kamax/mxisd:latest "/start.sh" 23 hours ago Up 23 hours 8090/tcp chat_id.1.garduqx3o0p5cx0ry6a48zoud
469eab54f50e matrixdotorg/synapse:latest "/start.py" 23 hours ago Up 23 hours 8008-8009/tcp, 8448/tcp chat_matrix.1.sdkw4te3mryqlv8syktrrhj69 Look at the container ID of your matrixdotorg/synapse container and execute this command to get into it : docker exec -it 469eab54f50e sh Now your in the bash of your container, exec this command to change the owner of the directory : chown -R 991:991 /data/media_store You can see the user id by using : > ls -lia /data/*.signing.key
5640776 -rw-r--r-- 1 991 991 59 Mar 26 09:03 /data/matrix.chat.nocturlab.fr.signing.key The Id you look for is |
@shiipou Your workaround works for me |
Thanks @rolfbachmann, your solution works great. Using docker-compose may be unrelated directly to the main issue, but still when using it, the error occurs. |
I'm confused about what the problem is. As far as I'm aware the original bug is fixed. If there is a problem with the docker-compose file then I suggest opening a new issue (though note that, as with all things under |
When you use the
generate
option of the docker image to generate a config file, there is no way to tell it where you want to put the media store etc, and it uses/
.Then, when you try to start synapse using the generated config, you get:
We should probably use
/data
by default (and recommend that a volume is mounted there), with an env var to allow you override the path. We also need to chown it so that synapse can write to it.A workaround is:
-w /data
to thegenerate
commandline, thendocker run <volume_options> --entrypoint=chown matrixdotorg/synapse:latest 901 /data
The text was updated successfully, but these errors were encountered: