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:
remove the bind mount from /etc/fstab
umount
remove the mount point directory
restore the app (if you have enough space on / !)
stop the app
copy (with right preservation, such as cp -a) the app www directory in the final location
remove the mount point content
add the bind mount in /etc/fstab
mount
start the app
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.
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.