Closed fflorent closed 3 years ago
I don't really know how other Yunohost package manage that (ping @YunoHost-Apps/apps-group) appart from making a backup and letting you manually transfer the changes if you want to (I do that for Pixelfed, it's painful, but at least my changes are not lost).
As a workaround to this issue, you may create a empty file with env variables (maybe with just a comment to explain how to fill it) and source it when running codimd. So the user can only tweak the file with env variable and the app maintainer may tweak the config.json
file at his/her convenience.
If I quote this page:
Environment variables take precedence over configurations from the config files. They generally start with CMD_ for our own options, but we also list node-specific options you can configure this way.
@fflorent This upgraded version of CodiMD allows installation in a sub-folder, therefore the config.json file has a new $path
argument hence the choice to overwrite the previous config.json file. Not ideal I guess...
Useful link for sourcing an environment file in a systemd service:
Describe the bug
When updating the application,
/var/www/codimd/config.json
is overwritten, despite the README file which invites to tweak it.
Yes it's a normal behavior, it's why during upgrade, there is : https://github.com/YunoHost-Apps/codimd_ynh/blob/58e85a9edda5b6a90dfb06b25a5534f1f07ff648/scripts/upgrade#L140
ynh_backup_if_checksum_is_different
keep a copy of the the config file to let you tweak again :)
Describe the bug
When updating the application,
/var/www/codimd/config.json
is overwritten, despite the README file which invites to tweak it.Versions
yunohost app info codimd
To Reproduce
/var/www/codimd/config.json
and in the "production"section the following line:
"tooBusyLag": 10000,`/var/www/codimd/config.json
fileExpected behavior You should see the
"tooBusyLag": 10000,
line in the above fileActual behavior The line has disappeared.