App structure
A Yunohost app package is a Git repository with such a structure:
myapp_ynh
βββ manifest.toml # The manifest
βββ scripts # The scripts
β βββ _common.sh
β βββ install
β βββ remove
β βββ backup
β βββ restore
β βββ change_url
β βββ upgrade
βββ conf # The configuration files to install
β βββ cinny.json
β βββ nginx.conf
βββ doc # The documentation
β βββ DESCRIPTION.md
β βββ DESCRIPTION_fr.md
β βββ PRE_INSTALL.md
β βββ screenshots
β βββ screenshot.png
βββ patches # Optional patches
βββ tests.toml # The tests manifest
βββ LICENSE
βββ README.md
The manifest contains upstream information, sources, version, installation questions and resources to initialize.
The scripts are called by YunoHost when operations are started by the admin.
The configuration files are templates that are filled and installed by the scripts, for example nginx
or systemd
or specific configs.
Patches are applied when downloading the upstream sources.
The documentation is used to show messages before / after install, upgrade, and in the webadmin.