diff --git a/manifest.json b/manifest.json index 3ef2dc8..db1bb7c 100644 --- a/manifest.json +++ b/manifest.json @@ -27,7 +27,7 @@ "multi_instance": false, "services": [ "nginx", - "php7.3-fpm", + "php8.0-fpm", "mysql" ], "arguments": { @@ -49,7 +49,7 @@ "en": "Choose the application language", "fr": "Choisissez la langue de l'application" }, - "choices": ["de", "en", "es", "fr", "it", "nl"], + "choices": ["de", "en", "es", "fr", "it", "nl", "pt"], "default": "en" }, { diff --git a/scripts/_common.sh b/scripts/_common.sh index 6f1c81c..4471fe0 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,9 +4,9 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="8.0" -extra_php_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-tidy php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd" +extra_php_dependencies="php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-tidy php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd" YNH_COMPOSER_VERSION=2.1.1 diff --git a/scripts/install b/scripts/install index 3ebf579..4b21d41 100644 --- a/scripts/install +++ b/scripts/install @@ -76,8 +76,8 @@ ynh_setup_source --dest_dir="$final_path" # Set permissions to app files chmod 755 $final_path -chown -R $app:www-data $final_path chmod -R o-rwx $final_path +chown -R $app:www-data $final_path #================================================= # NGINX CONFIGURATION diff --git a/scripts/restore b/scripts/restore index 6039fae..3d7c360 100644 --- a/scripts/restore +++ b/scripts/restore @@ -27,7 +27,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +phpversion=$YNH_PHP_VERSION #================================================= # CHECK IF THE APP CAN BE RESTORED diff --git a/scripts/upgrade b/scripts/upgrade index a693c39..8625bca 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,7 +23,7 @@ language=$(ynh_app_setting_get --app=$app --key=language) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +phpversion=$YNH_PHP_VERSION #================================================= # CHECK VERSION @@ -68,7 +68,7 @@ then cp -a "$final_path/.env" "$tmpdir/.env" # Remove the app directory securely - ynh_secure_remove --file="$final_path" + #ynh_secure_remove --file="$final_path" # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" @@ -80,6 +80,12 @@ then ynh_secure_remove --file="$tmpdir" fi +# Set permissions on app files +chmod 755 $final_path +chmod -R o-rwx $final_path +chown -R $app:www-data $final_path +chmod 600 $final_path/.env + #================================================= # NGINX CONFIGURATION #================================================= @@ -102,7 +108,7 @@ ynh_add_fpm_config --package="$extra_php_dependencies" ynh_script_progression --message="Installing BookStack with Composer..." --weight=5 # Install composer -ynh_install_composer --phpversion=$phpversion --workdir=$final_path --install_args="--prefer-source --no-dev" +ynh_install_composer --phpversion=$phpversion --workdir=$final_path --install_args="--no-dev" #================================================= # FINAL BOOKSTACK INSTALL @@ -115,12 +121,6 @@ pushd $final_path && php$phpversion artisan view:clear --no-interaction popd -# Set permissions on app files -chmod 755 $final_path -chown -R $app:www-data $final_path -chmod -R o-rwx $final_path -chmod 600 $final_path/.env - #================================================= # RELOAD NGINX #=================================================