YunoHost / package_linter

Linter for YunoHost applications packages
https://yunohost.org/#/packaging_apps
GNU Affero General Public License v3.0
17 stars 13 forks source link

Change web applications location policy #103

Closed tituspijean closed 1 year ago

tituspijean commented 2 years ago

So, it's a bit opinionated, but I prefer the webapp location policy from before December 2021:

Supporting documentation:

/var contains variable data files. This includes spool directories and files, administrative and logging data, and transient and temporary files.

(source : https://www.pathname.com/fhs/2.2/fhs-5.1.html) From that phrasing, I feel no binary should be installed in there, only data file. (Remains the case of composer, I know...)

/opt is reserved for the installation of add-on application software packages. A package to be installed in /opt must locate its static files in a separate /opt/ directory tree, where is a name that describes the software package.

(source: https://www.pathname.com/fhs/2.2/fhs-3.12.html) "add-on application software packages" being a verbose way of saying non-system, user-installed software.

If the app uses NGINX as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app". If the app provides an internal web server (or uses another application server such as uWSGI), the final path should be "/opt/yunohost/$app"

(source: our own example_ynh https://github.com/YunoHost/example_ynh/blob/master/scripts/install#L59-L60)


This may be thrown out in the future, especially if we move to storing all apps in a dedicated .../yunohost directory.

tituspijean commented 1 year ago

We will rather move to a global /apps directory, as per https://github.com/YunoHost/issues/issues/1936.