From b32ccf5ee8fb1e7ebad26b4412cf3da02166a1b7 Mon Sep 17 00:00:00 2001 From: Boudewijn Date: Sat, 1 Mar 2025 17:42:29 +0100 Subject: [PATCH] Update description and other docs, cleanup scripts --- conf/.env | 6 ------ conf/nginx.conf | 5 +---- doc/DESCRIPTION.md | 2 ++ doc/POST_INSTALL.md | 4 ++-- doc/PRE_INSTALL.md | 4 +++- scripts/install | 25 ++++--------------------- 6 files changed, 12 insertions(+), 34 deletions(-) diff --git a/conf/.env b/conf/.env index fb14370..281d10a 100644 --- a/conf/.env +++ b/conf/.env @@ -3,14 +3,8 @@ APP_ENV=production APP_KEY= APP_DEBUG=false APP_URL=https://__DOMAIN__ -#APP_FORCE_HTTPS=false -#APP_DIR=__PATH__/ -# DB_CONNECTION can be sqlite, mysql or pgsql. For sqlite the other entries are -# not required, but an existing sqlite3 database may be specified if desired. In -# this case, please use an absolute path. DB_DATABASE may be omitted but should -# *not* be left blank. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 diff --git a/conf/nginx.conf b/conf/nginx.conf index f3f0851..2c28631 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,11 +1,8 @@ -# I'm unable to get it to work in a subdir; disable for now -#rewrite ^/__PATH__$ /__PATH__/ permanent; # try redirecting stuff to index.php rewrite ^(.*)$ /index.php$1 last; location / { - #alias /var/www/__APP__/public/; alias __INSTALL_DIR__/public/; index index.php; @@ -29,7 +26,7 @@ location / { # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } - +# not tested; it may have trouble redirecting location /api/ { try_files $uri $uri/ /api/index.php?$query_string; } diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 929695f..fd79a84 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -10,6 +10,7 @@ What works: What does not (yet?) work: * no backup +* no explicit fail2ban config * moving the app to another domain * installing the app in subfolder * LDAP integration @@ -19,6 +20,7 @@ What I intend to work on enabling: * create your account from this install page, instead of manually in the app on first use. Once that is done, I will change the default group from "all_users" to "visitors" * moving app to another domain * installing to subdirectory +* see whether fail2ban needs a specific config, add if needed diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index f42358d..97477c6 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -1,7 +1,7 @@ -This is a dummy disclaimer to display after the install - The app url is The app install dir is `__INSTALL_DIR__` The app id is `__ID__` + +Please open the app to create an account. The account will unfortunately not be synchronized with Yunohost users. diff --git a/doc/PRE_INSTALL.md b/doc/PRE_INSTALL.md index 4728a7d..21facd0 100644 --- a/doc/PRE_INSTALL.md +++ b/doc/PRE_INSTALL.md @@ -1 +1,3 @@ -pre-install.md: This is a dummy disclaimer to display prior to the install +For now, only the domain and group can be set. + +After installation, visit the app to create an account. As this is a single-user app, the registration page will not be available after that anymore. diff --git a/scripts/install b/scripts/install index 1ff3ee4..429ed9f 100755 --- a/scripts/install +++ b/scripts/install @@ -26,14 +26,6 @@ source /usr/share/yunohost/helpers ### $app is the app id (i.e. 'example' for first install, ### or 'example__2', '__3'... for multi-instance installs) -#================================================= -# INITIALIZE AND STORE SETTINGS -#================================================= - -# wbk fixme - check whether one of these work -#ynh_composer_version = "2.2.0" -#ynh_app_setting_set --key=YNH_COMPOSER_VERSION --value=$(composer --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -47,16 +39,9 @@ chown -R "$app:www-data" "$install_dir" #================================================= ynh_script_progression "Adding $app's configuration files..." -### You can add specific configuration files. -### -### Typically, put your template conf file in ../conf/your_config_file -### The template may contain strings such as __FOO__ or __FOO_BAR__, -### which will automatically be replaced by the values of $foo and $foo_bar -### Check the documentation of `ynh_config_add` for more info. - ynh_config_add --template=.env --destination="$install_dir/.env" -chmod 600 "$install_dir/.env" +chmod 640 "$install_dir/.env" chown "$app:www-data" "$install_dir/.env" @@ -77,14 +62,17 @@ ynh_script_progression "Adding system configurations related to $app..." ### - And the section "PHP-FPM CONFIGURATION" in the upgrade script # Create a PHP-FPM config (with conf/extra_php-fpm.conf being appended to it) +# (added to nginx.conf) #ynh_config_add_phpfpm # Create a dedicated NGINX config using the conf/nginx.conf template +# (the PHP-FPM config is here as well) ynh_config_add_nginx # systemd : not applicable, runs via php-fpm and nginx # Create a dedicated Fail2Ban config +# todo #ynh_config_add_fail2ban --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login" #================================================= @@ -92,12 +80,7 @@ ynh_config_add_nginx #================================================= ynh_script_progression "Installing app with Composer..." -# ynh_composer_update bestaat niet, proberen met enkel install.. -#ynh_composer_update - -#echo "ynh_composer_version="$ynh_composer_version #wbk fixme manual installation needed an update before executing install -#ynh_composer_exec update ynh_composer_install ynh_composer_exec install --no-dev