-
-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[syncthing] Improve configuration #450
Conversation
Use environment variables instead of CLI arguments where possible and properly separate config and database/state directories.
Besides, I'm wondering whether we should limit the mounts (
|
After the change the default configuration will just work for most of the users. I would keep all the folder just in case if someone needs it. |
Yeah, I feel the same. The official add-on development documentation only states about the
The documentation of the official Samba add-on gives some more info about the purpose of these folders:
Note that
The Samba add-on has access to all of these folders to provide users with a convenient way to edit config files, not because Samba itself needs access.
I'd rather limit access to only the folders for which there's an actual Syncthing use case, i.e. |
syncthing can be also used to check/edit configuration like smb. You could just sync ha config, change it locally and reload. |
btw is migration script needed? If it stop working after update it will be pretty annoying. |
Yeah, I thought about such a use case. But honestly, I don't think it is a good idea. Way too easy to accidentally delete your HA config. People should just use the official File editor or Studio Code Server add-ons or SSH into HA to directly edit config files. Plus, mapping
Ideally yes. I think all we need to do for proper migration is to check if there's a
Update: See 289da16 |
Thanks a lot guys for making those changes. I hope I can find some time this week to go through the MRs 💟 |
Due the merge conflicts I patched the changes manually ;) See #452 |
@Poeschl I just updated my HA instance to the latest add-on version 1.18.0 and noticed the config migration didn't work as expected because of an unsupported This means the 1.18.0 version breaks people's Syncthing config. Merging #453 should resolve it, so please have a look ASAP. Thanks! |
Changes:
Use environment variables instead of CLI arguments where possible and properly separate config and database/state directories (related to make default folder persistent #447 (comment)).
With this change, the add-on now mounts the new
addon_config
instead ofconfig
and stores Syncthing's/config
which maps to/mnt/data/supervisor/addon_configs/243ffc37_syncthing/
on the host (I think?)./data
which maps to/mnt/data/supervisor/addons/data/243ffc37_syncthing/
on the host.Set
HOME=/share
as default folder path fallback, thus fix make default folder persistent #447.Slightly improve the logging in the s6 run script.
Avoid creating a default folder when generating an initial configuration / starting for the first time by setting
STNODEFAULTFOLDER=1
. Syncthing shouldn't actually attempt to create a default folder since we setSTCONFDIR
andSTDATADIR
to paths that already exist. But in case anything goes south,STNODEFAULTFOLDER=1
ensures we don't start writing to arbitrary paths.Note that I haven't actually tested this PR yet 😬