YunoHost / issues

General issue tracker for the YunoHost project
71 stars 8 forks source link

Better support for bind mount on /var/www/app : change the way to check if a directory already exists #2328

Open lapineige opened 4 months ago

lapineige commented 4 months ago

The issue

Current support for the use of bind mounts on a /var/www/app directory isn't great, because it's impossible to restore an app. Indeed a restore will fail with a /var/www/app already exist (or similar) error, because it's required for the bind mount.

Right now if an upgrade fails, Yunohost will not be able to restore the app. Then you have to:

Possible solutions

The main thing is that Yunohost should accept a /var/www/app directory that exists but is empty. I don't know what the code does, but I guess it check if the directory already exists. Instead, it could check its content, and if it's empty, change the permissions as needed and then use it.