Partial configuration is reset every time docker runs
nos86 opened this issue · 2 comments
Hi,
first of all, thanks for your work.
I'm setting up your image as following:
docker run -d --network=host -v shared-data:/syncthing/data -v sync-config:/syncthing/config --name syncthing funkyfuture/rpi-syncthing
So, actually, I'm using two volumes to store configuration and data. I noticed that even if user and password are correctly stored in sync-config volume, as soon as I restart the docker (docker stop & docker start) I lost this kind of information.
I think issue should be addressed to start.sh where you override this part of configuration every time.
Before I fork your repository, do you have any chance to fix the glitch?
Thank you in advance,
Salvo
ciao,
how did you set user and password? (relates to the gui, right?) is any other data affected? are these sustained named volumes created with docker volume create
?
the problem is mentioned in the first paragraph here, but thanks for pointing it out as issue.
yes, in start.sh
there should be tests that check if a value is set and not apply the default in that case, while still replacing the value if a corresponding environment variable is provided to the container. simplest implementation is probably to populate the environment variables that are not defined before this if a config file exists and there is a corresponding value in that file.
actually i'd be glad if you forked, patched and opened a pull request as i have an overcrowded todo-list and you could test it on an actual use-case.
let's put it this way: the available environment variables are supposed to be defined on each and every container creation.