YunoHost-Apps / my_webapp_ynh

Custom Web app with SFTP access
GNU General Public License v3.0
48 stars 42 forks source link

avoid nuking existing nginx configs on update #93

Closed mooseyboots closed 1 year ago

mooseyboots commented 2 years ago

Describe the bug

on updating an instance of my_webapp, existing nginx config is backed up and a new one put in its place. i wonder if this makes sense in the case of such an app, which will almost always require substantial user edits to its nginx config to run the app it contains. is there no way around it? merging the changes back in by hand seems pretty fiddly and error-prone. are the changes to the nginx config in a new version ever significant themselves? if not, is it possible to check whether there are any significant changes and only push the existing config aside if there are?

ideally a diff/merge would be possible.

Context

Steps to reproduce

upgrade from ~ynh9 to ~ynh10

tituspijean commented 2 years ago

Hi @mooseyboots, thanks for the feedback! We will re-implement this feature in the version after the one we just released. So if you want to avoid re-writing your configs again, avoid to upgrade to v~ynh11. ;)

tituspijean commented 1 year ago

You might also have a look the hooks system in our documentation. With these you can implement a basic bash script that will re-override the NGINX config after an upgrade.