From 7ec393755fe56b3bd3a6cbda4c3cb4f525d159f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 2 Mar 2023 23:29:29 +0100 Subject: [PATCH] v2 --- doc/ADMIN.md | 1 + doc/{DISCLAIMER_fr.md => ADMIN_fr.md} | 0 doc/DISCLAIMER.md | 12 ------------ manifest.toml | 19 +++++++++---------- scripts/install | 13 ------------- scripts/remove | 10 ---------- scripts/restore | 14 -------------- scripts/upgrade | 11 ----------- tests.toml | 3 +++ 9 files changed, 13 insertions(+), 70 deletions(-) create mode 100644 doc/ADMIN.md rename doc/{DISCLAIMER_fr.md => ADMIN_fr.md} (100%) delete mode 100644 doc/DISCLAIMER.md create mode 100644 tests.toml diff --git a/doc/ADMIN.md b/doc/ADMIN.md new file mode 100644 index 0000000..f4d0806 --- /dev/null +++ b/doc/ADMIN.md @@ -0,0 +1 @@ +How to configure this app: Go to `__DOMAIN__/cp-admin` to connect to the administration panel. diff --git a/doc/DISCLAIMER_fr.md b/doc/ADMIN_fr.md similarity index 100% rename from doc/DISCLAIMER_fr.md rename to doc/ADMIN_fr.md diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md deleted file mode 100644 index 155a15a..0000000 --- a/doc/DISCLAIMER.md +++ /dev/null @@ -1,12 +0,0 @@ -## Configuration - - * How to configure this app: Go to `domain.ltd/cp-admin` to connect to the administration panel. - -#### Multi-user support - - * Are LDAP and HTTP auth supported? **No** - * Can the app be used by multiple users? **Yes** - -## Limitations - -* :warning: Installation possible only on a root domain or subdomain. diff --git a/manifest.toml b/manifest.toml index 6542932..2284e4a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,18 +17,17 @@ admindoc = "https://docs.castopod.org/" code = "https://code.castopod.org/adaures/castopod" [integration] -yunohost = ">= 11.1.0" +yunohost = ">= 11.1.12" architectures = "all" multi_instance = true -ldap = "false" -sso = "false" -disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... -ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... -ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +ldap = false +sso = false +disk = "50M" +ram.build = "50M" +ram.runtime = "50M" [install] [install.domain] - # this is a generic question - ask strings are automatically handled by Yunohost's core help.en = "Castopod needs to be installed in a dedicated domain or sub-domain." help.fr = "Castopod doit être installé dans un domaine ou sous-domaine dédié." type = "domain" @@ -48,9 +47,9 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen [resources.permissions] main.url = "/" + [resources.apt] + packages = "mariadb-server ffmpeg php8.1-fpm php8.1-mysql php8.1-gd php8.1-intl php8.1-curl php8.1-mbstring php8.1-xml php8.1-mysqlnd" + [resources.database] type = "mysql" - [resources.apt] - packages = "ffmpeg php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysqlnd" - diff --git a/scripts/install b/scripts/install index 77240cb..ccbd567 100755 --- a/scripts/install +++ b/scripts/install @@ -34,7 +34,6 @@ ynh_script_progression --message="Setting up source files..." --weight=2 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -46,11 +45,6 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 - # Create a dedicated NGINX config ynh_add_nginx_config @@ -79,13 +73,6 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index bbbe3a5..3638a02 100755 --- a/scripts/remove +++ b/scripts/remove @@ -23,19 +23,9 @@ ynh_script_progression --message="Removing the Redis database..." --weight=1 ynh_redis_remove_db "$redis_db" -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 - # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2 - # Remove the dedicated PHP-FPM config ynh_remove_fpm_config diff --git a/scripts/restore b/scripts/restore index 4e41a05..09b0a21 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,14 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) -fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) - #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -25,7 +17,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -36,11 +27,6 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 - ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 2f88e7a..ba8049c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,16 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -redis_db=$(ynh_app_setting_get --app=$app --key=redis_db) -fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) -fpm_free_footprint=$(ynh_app_setting_get --app=$app --key=fpm_free_footprint) -fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) - #================================================= # CHECK VERSION #================================================= @@ -62,7 +52,6 @@ then ynh_setup_source --dest_dir="$install_dir" --keep=".env" fi -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" diff --git a/tests.toml b/tests.toml new file mode 100644 index 0000000..eb73b8d --- /dev/null +++ b/tests.toml @@ -0,0 +1,3 @@ +test_format = 1.0 + +[default] \ No newline at end of file