1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/moodle_ynh.git synced 2024-09-03 19:46:23 +02:00
* Upgrade (#68)

* Apply example_ynh

* Fix melange-de-versions

https://forum.yunohost.org/t/melange-de-versions-de-moodle-detectees/19985

* Update manifest.json

* Auto-update README

Co-authored-by: yunohost-bot <yunohost@yunohost.org>

* 4.0.2 (#71)

* 4.0.2

* Auto-update README

Co-authored-by: yunohost-bot <yunohost@yunohost.org>

* Auto-update README

* Bullseye (#73)

* Update manifest.json

* Auto-update README

* Update upgrade

* Fix

* Auto-update README

* Auto-update README

Co-authored-by: yunohost-bot <yunohost@yunohost.org>

* 4.0.3 (#74)

* 4.0.3

* Auto-update README

Co-authored-by: yunohost-bot <yunohost@yunohost.org>

* 4.0.4

* Auto-update README

* 4.1.0 (#77)

* 4.1.0

* Auto-update README

* fix PHP

* Update config_panel.toml

* Update config_panel.toml

Co-authored-by: yunohost-bot <yunohost@yunohost.org>

Co-authored-by: yalh76 <yalh@yahoo.com>
Co-authored-by: yunohost-bot <yunohost@yunohost.org>
This commit is contained in:
Éric Gaspar 2022-12-28 09:05:05 +01:00 committed by GitHub
parent bf35ed547c
commit 1f995ff7f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 47 additions and 23 deletions

View file

@ -20,7 +20,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Moodle is widely used around the world by universities, schools, companies and all manner of organisations and individuals. Moodle is widely used around the world by universities, schools, companies and all manner of organisations and individuals.
**Shipped version:** 4.0.4~ynh1 **Shipped version:** 4.1.0~ynh1
**Demo:** https://sandbox.moodledemo.net/ **Demo:** https://sandbox.moodledemo.net/

View file

@ -20,7 +20,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
Moodle est largement utilisé dans le monde entier par les universités, les écoles, les entreprises et toutes sortes d'organisations et d'individus. Moodle est largement utilisé dans le monde entier par les universités, les écoles, les entreprises et toutes sortes d'organisations et d'individus.
**Version incluse :** 4.0.4~ynh1 **Version incluse :** 4.1.0~ynh1
**Démo :** https://sandbox.moodledemo.net/ **Démo :** https://sandbox.moodledemo.net/

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/moodle/moodle/archive/v4.0.4.zip SOURCE_URL=https://github.com/moodle/moodle/archive/v4.1.0.zip
SOURCE_SUM=f1a14cd9a03568f1f6beb61479ef696de61bcf986d63f48f5b29f9c0a18cb597 SOURCE_SUM=1f7ae1e72e1d7e3b01ae3199ee78dd7b100f21ab3447457ea170ac1a8f96cf20
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

4
conf/extra_php-fpm.conf Normal file
View file

@ -0,0 +1,4 @@
; Additional php.ini defines, specific to this pool of workers.
php_admin_value[upload_max_filesize] = 1G
php_admin_value[post_max_size] = 1G

View file

@ -7,19 +7,24 @@ name = "Moodle configuration"
name = "PHP-FPM configuration" name = "PHP-FPM configuration"
[main.php_fpm_config.fpm_footprint] [main.php_fpm_config.fpm_footprint]
ask = "Memory footprint of the service?" ask = "Memory footprint"
choices = ["low", "medium", "high", "specific"] type = "select"
choices.low = "Low, <= 20Mb per pool"
choices.medium = "Medium, between 20Mb and 40Mb per pool"
choices.high = "High, > 40Mb per pool"
choices.specific = "Use specific value"
default = "low" default = "low"
help = "low <= 20Mb per pool. medium between 20Mb and 40Mb per pool. high > 40Mb per pool.<br>Use specific to set a value with the following option."
[main.php_fpm_config.free_footprint] [main.php_fpm_config.fpm_free_footprint]
visible = "fpm_footprint == 'specific'"
ask = "Memory footprint of the service?" ask = "Memory footprint of the service?"
type = "number" type = "number"
default = "0" default = "0"
help = "Free field to specify exactly the footprint in Mb if you don't want to use one of the three previous values." help = "Free field to specify exactly the footprint in Mb if you don't want to use one of the three previous values."
[main.php_fpm_config.fpm_usage] [main.php_fpm_config.fpm_usage]
ask = "Expected usage of the service?" ask = "Expected usage"
type = "select"
choices = ["low", "medium", "high"] choices = ["low", "medium", "high"]
default = "low" default = "low"
help = "low: Personal usage, behind the sso. No RAM footprint when not used, but the impact on the processor can be high if many users are using the service.<br>medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.<br>high: High usage, frequently visited website. High RAM footprint, but lower on processor usage and quickly responding." help = "low: Personal usage, behind the SSO. No RAM footprint when not used, but the impact on the processor can be high if many users are using the service.<br>medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.<br>high: High usage, frequently visited website. High RAM footprint, but lower on processor usage and quickly responding."

View file

@ -6,7 +6,7 @@
"en": "Online learning platform", "en": "Online learning platform",
"fr": "Plateforme d'apprentissage en ligne" "fr": "Plateforme d'apprentissage en ligne"
}, },
"version": "4.0.4~ynh1", "version": "4.1.0~ynh1",
"url": "https://moodle.org/", "url": "https://moodle.org/",
"upstream": { "upstream": {
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",

View file

@ -56,10 +56,10 @@ set__fpm_footprint() {
fi fi
} }
set__free_footprint() { set__fpm_free_footprint() {
if [ "$fpm_footprint" == "specific" ] if [ "$fpm_footprint" = "specific" ]
then then
ynh_app_setting_set --app=$app --key=fpm_footprint --value="$free_footprint" ynh_app_setting_set --app=$app --key=fpm_footprint --value="$fpm_free_footprint"
fi fi
} }
@ -70,11 +70,11 @@ set__free_footprint() {
ynh_app_config_validate() { ynh_app_config_validate() {
_ynh_app_config_validate _ynh_app_config_validate
if [ "${changed[fpm_usage]}" == "true" ] || [ "${changed[fpm_footprint]}" == "true" ] || [ "${changed[free_footprint]}" == "true" ]; then if [ "${changed[fpm_usage]}" == "true" ] || [ "${changed[fpm_footprint]}" == "true" ] || [ "${changed[fpm_free_footprint]}" == "true" ]; then
# If fpm_footprint is set to 'specific', use $free_footprint value. # If fpm_footprint is set to 'specific', use $fpm_free_footprint value.
if [ "$fpm_footprint" == "specific" ] if [ "$fpm_footprint" = "specific" ]
then then
fpm_footprint=$free_footprint fpm_footprint=$fpm_free_footprint
fi fi
if [ "$fpm_footprint" == "0" ] if [ "$fpm_footprint" == "0" ]

View file

@ -30,6 +30,9 @@ app=$YNH_APP_INSTANCE_NAME
email=$(ynh_user_get_info --username=$admin --key=mail) email=$(ynh_user_get_info --username=$admin --key=mail)
password=$(ynh_string_random --length=30) password=$(ynh_string_random --length=30)
fpm_footprint="low"
fpm_free_footprint=0
fpm_usage="low"
#================================================= #=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
@ -51,6 +54,9 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_app_setting_set --app=$app --key=site_name --value=$site_name ynh_app_setting_set --app=$app --key=site_name --value=$site_name
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
#================================================= #=================================================
# STANDARD MODIFICATIONS # STANDARD MODIFICATIONS
@ -99,7 +105,7 @@ chown -R $app:www-data "$final_path"
ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 ynh_script_progression --message="Configuring PHP-FPM..." --weight=1
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================

View file

@ -24,7 +24,9 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir)
db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_name=$(ynh_app_setting_get --app=$app --key=db_name)
site_name=$(ynh_app_setting_get --app=$app --key=site_name) site_name=$(ynh_app_setting_get --app=$app --key=site_name)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) 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) fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage)
#================================================= #=================================================
@ -80,12 +82,19 @@ if [ -z "$fpm_footprint" ]; then
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
fi fi
# If fpm_free_footprint doesn't exist, create it
if [ -z "$fpm_free_footprint" ]; then
fpm_free_footprint=0
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
fi
# If fpm_usage doesn't exist, create it # If fpm_usage doesn't exist, create it
if [ -z "$fpm_usage" ]; then if [ -z "$fpm_usage" ]; then
fpm_usage=low fpm_usage=low
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
fi fi
# If datadir doesn't exist, create it # If datadir doesn't exist, create it
if [ -z "$datadir" ]; then if [ -z "$datadir" ]; then
datadir=$(ynh_app_setting_get --app=$app --key=data_path) datadir=$(ynh_app_setting_get --app=$app --key=data_path)