1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mineweb_ynh.git synced 2024-09-03 19:45:54 +02:00
* 4.3 (#17)
This commit is contained in:
Éric Gaspar 2021-11-17 21:36:22 +01:00 committed by GitHub
parent 8f460e5b2e
commit f1d472ec8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 40 additions and 14 deletions

View file

@ -32,7 +32,7 @@ Vous pourrez tenir vos joueurs au courant des actualités, leur faire acheter de
* Official app website: https://mineweb.org/
* Official admin documentation: https://docs.mineweb.org/
* Upstream app code repository: ttps://github.com/MineWeb/MineWebCMS/
* Upstream app code repository: https://github.com/MineWeb/MineWebCMS/
* YunoHost documentation for this app: https://yunohost.org/app_mineweb
* Report a bug: https://github.com/YunoHost-Apps/mineweb_ynh/issues

View file

@ -28,7 +28,7 @@ Vous pourrez tenir vos joueurs au courant des actualités, leur faire acheter de
* Site officiel de l'app : https://mineweb.org/
* Documentation officielle de l'admin : https://docs.mineweb.org/
* Dépôt de code officiel de l'app : ttps://github.com/MineWeb/MineWebCMS/
* Dépôt de code officiel de l'app : https://github.com/MineWeb/MineWebCMS/
* Documentation YunoHost pour cette app : https://yunohost.org/app_mineweb
* Signaler un bug : https://github.com/YunoHost-Apps/mineweb_ynh/issues

View file

@ -4,11 +4,6 @@ location __PATH__/ {
# Path to source
alias __FINALPATH__/app/webroot/ ;
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
index index.php;
try_files $uri $uri/ __PATH__/__PATH__/index.php?$query_string;

View file

@ -12,7 +12,7 @@
"license": "AGPL-3.0-only",
"website": "https://mineweb.org/",
"admindoc": "https://docs.mineweb.org/",
"code": "ttps://github.com/MineWeb/MineWebCMS/"
"code": "https://github.com/MineWeb/MineWebCMS/"
},
"license": "AGPL-3.0-only",
"maintainer": {
@ -20,7 +20,7 @@
"email": "liberodark@gmail.com"
},
"requirements": {
"yunohost": ">= 4.2.4"
"yunohost": ">= 4.3.0"
},
"multi_instance": true,
"services": [

View file

@ -8,7 +8,7 @@
YNH_PHP_VERSION="7.3"
# dependencies used by the app
extra_php_dependencies="php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-curl"
pkg_dependencies="php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-curl"
#=================================================
# PERSONAL HELPERS

View file

@ -26,6 +26,7 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC
phpversion=$YNH_PHP_VERSION
app=$YNH_APP_INSTANCE_NAME
@ -47,6 +48,14 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
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=phpversion --value=$phpversion
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Installing dependencies..." --weight=1
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# STANDARD MODIFICATIONS
@ -94,8 +103,7 @@ ynh_add_nginx_config
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --package="$extra_php_dependencies"
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
ynh_add_fpm_config
#=================================================
# MODIFY A CONFIG FILE

View file

@ -36,6 +36,14 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=4
# Remove a database if it exists, along with the associated user
ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# REMOVE APP MAIN DIR
#=================================================

View file

@ -67,10 +67,17 @@ chown -R $app:www-data "$final_path"
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
ynh_add_fpm_config --package="$extra_php_dependencies"
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# RESTORE THE MYSQL DATABASE

View file

@ -101,17 +101,25 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=1
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --package="$extra_php_dependencies"
ynh_add_fpm_config
#=================================================
# MODIFY A CONFIG FILE
#=================================================
ynh_script_progression --message="Updating a configuration file..."--weight=1
ynh_add_config --template="../conf/database.php" --destination="$final_path/app/Config/database.php"