Open alexAubin opened 1 year ago
Provide common directories for build :
Revamp the logs, with "hierarchical" logs (for now all log files are at the same level, hard to decide which sub-command is about which main command)
Hello,
Some others good thing would be:
Would be good to have more standard filesystem hierarchy for app. Except the big discussion about where we should store app code there are also some directories whish are currently completely not standardized like logs and config file.
By example for log should be really good to be able as same as for data to have a standard directory for each app and to have logrotate automatically managed.
On config side for me where are also some more standardization which could be done. Firtly as same as for logs would be good to have a standard dir like /etc/yunohost.app/$app
or /srv/yunohost/$app/config
. And secondly actually we have 2 different way to manage configuration on yunohost. We have one specific system for the core and an other one for app. For me (and for users) it would be really good if we are able to have one standard configuration system which apply for the core and for the app with the same comportment. And finally it would be really nice to have jinja as the template system for app to have a more standardized and flexible template system.
By example for log should be really good to be able as same as for data to have a standard directory for each app and to have logrotate automatically managed.
I fully agree. TBH I would love to see removed [resource.install_dir] and [resource.data_dir] and see, instead some more generic form:
[resources.dirs.install_dir]
# sane defaults for well-known install_dir
[resources.dirs.data_dir]
# sane defaults for well-known data_dir
[resources.dirs.log_dir]
# sane defaults for well-known log_dir
[resources.dirs.downloads_dir]
path = "{{install_dir}}/downloads"
owner = "www-data:rwx"
Firtly as same as for logs would be good to have a standard dir like /etc/yunohost.app/$app or /srv/yunohost/$app/config
Unfortunately, every software comes with its own way configuration "paradigm". gitea uses custom/conf/app.ini
, mediawiki uses LocalSettings.php, etc… It's kinda impossible to standardize (or we would need to patch apps… don't want that)
it would be really good if we are able to have one standard configuration system which apply for the core and for the app with the same comportment
Agreed. What could be done though, would be to edit files in /etc/yunohost.app/$app and then call "yunohost app reconfigure $app" or something related.
Unfortunately, every software comes with its own way configuration "paradigm". gitea uses
custom/conf/app.ini
, mediawiki uses LocalSettings.php, etc… It's kinda impossible to standardize (or we would need to patch apps… don't want that)
Patching app is not a great solution. But sometime we juste use symbolic link to fix this. And for app which don't have any working solutions this is not mandatory. It could also be managed as currently if needed. But I think most of app should have a solution I think.
- Make way for 'helper' apps - stuff like mongodb could be installed as dedicated app with all the necessary hacks required to make it work. Another helper would be bridge helpers to allow mautrix_* to be installed with all of Matrix servers (currently crucial script is a part of Synapse_ynh and bridges are hardwired to use Synapse)
Yes adding a solution to link
apps and to manage app dependancy would be really useful but I think a features like this need reflexion beaucaue there are a lot of use cases and there are also a lot of different features that we can add in this context.
Yes adding a solution to
link
apps and to manage app dependancy would be really useful but I think a features like this need reflexion beaucaue there are a lot of use cases and there are also a lot of different features that we can add in this context.
Oh, that was exactly my point :) Make sure dex
is uninstalled when outline
gets deleted and prevent it from being uninstalled (or at least warn) if doing so would brick another app.
Oh, that was exactly my point :) Make sure
dex
is uninstalled whenoutline
gets deleted and prevent it from being uninstalled (or at least warn) if doing so would brick another app.
But about Dex for me OIDC whoud be added on the core beaucause more and more app will need it.
I was also tempted to add in the which list the OIDC support but it's a bit out of scoops. But yes for me more and more app will need this for authentication (synapse by example will soon need it) and it might be good to have it natively. There are by example this library which could do it https://github.com/IdentityPython/pyop
Tracked ownership of files installed outside of $install_dir, kinda like real packages from package managers.
Like a replacement of ynh_add_config
with ynh_install_file
that will save the path of this file in some database, just like apt dependencies.
This way, backup/restore/remove can be automatically handled.
ynh_install_file
could have several arguments:
Should we switch to full jinja for templates x_x ... Or conditional / dynamic properties ?
It's not clear what you mean with "dynamic properties", but jinja is a very good idea. Jinja-like templates are very easy to understand for non-programmers, very well documented, and have several implementations (with minor differences) in many programming languages.
Have a "under maintenance" 503 page during upgrade / change_url like some apps do (discourse wordpress etherpad lutim acropolis pihole my_webapp).
Have a "under maintenance" 503 page during upgrade / change_url like some apps do (discourse wordpress etherpad lutim acropolis pihole my_webapp).
In the same vein, maybe add a setting to define what to do when the app backend is unreachable. Right now i think somehow we end up back on SSOWat homepage which is really confusing. Maybe some app just get a generic 503, maybe some have an integrated maintenance/status page, etc...
A suggestion of an $install_dir topology, considering what we learned:
$install_dir/
├── bin/
│ ├── corepack binaries
│ ├── composer
│ └── what else?
├── sources/ (ynh_setup_source)
├── www/ or dist/
├── cache/
│ ├── things that wont be backed up
│ ├── and can be deleted automatically by yunohost
│ └── (nodejs cache, composer cache, cargo cache, etc)
└── garbage files because it's a $HOME so .bashrc etc
Also directories could be created automatically.
For example ynh_use_node
creates cache/npm
etc.
The bin directory could also contain things to run yunohost like aliases for yunohost app shell
app.src
format ofynh_setup_source
: https://github.com/YunoHost/issues/issues/1978--keep
optioninclude $app.d/*.conf
? And also stuff like__YNH_DEFAULT_CSP_HEADER__
or__YNH_PORTAL_BUTTON__
/apps
or/var/apps/
or idk (and maybe/home/yunohost.app
to somewhere else too ... to be discussed .. needs to be thinked about in relation to eg /var/lib/mysql and postgresql too). Basically there's a whole story of "how to could people move the large data locations to some other disk somewhat easily"foobar-84fe312a
instead of justfoobar
such that restoringfoobar
on another system isnt blocked by the fact that a differentfoobar
is already installed ...chattr -i/+i
at least on the settings.yml file.ynh/
folder (or similar) with yunohost package-related stuff, similar todebian/
folderCODEOWNERS
?ynh_add_config
(orynh_add_config_hook
) (or actually in a declarative way in manifest just like for nginx etc)