mirror of
https://github.com/YunoHost-Apps/mineweb_ynh.git
synced 2024-09-03 19:45:54 +02:00
parent
8f460e5b2e
commit
f1d472ec8b
9 changed files with 40 additions and 14 deletions
|
@ -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 app website: https://mineweb.org/
|
||||||
* Official admin documentation: https://docs.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
|
* YunoHost documentation for this app: https://yunohost.org/app_mineweb
|
||||||
* Report a bug: https://github.com/YunoHost-Apps/mineweb_ynh/issues
|
* Report a bug: https://github.com/YunoHost-Apps/mineweb_ynh/issues
|
||||||
|
|
||||||
|
|
|
@ -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/
|
* Site officiel de l'app : https://mineweb.org/
|
||||||
* Documentation officielle de l'admin : https://docs.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
|
* Documentation YunoHost pour cette app : https://yunohost.org/app_mineweb
|
||||||
* Signaler un bug : https://github.com/YunoHost-Apps/mineweb_ynh/issues
|
* Signaler un bug : https://github.com/YunoHost-Apps/mineweb_ynh/issues
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,6 @@ location __PATH__/ {
|
||||||
# Path to source
|
# Path to source
|
||||||
alias __FINALPATH__/app/webroot/ ;
|
alias __FINALPATH__/app/webroot/ ;
|
||||||
|
|
||||||
# Force usage of https
|
|
||||||
if ($scheme = http) {
|
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
|
||||||
}
|
|
||||||
|
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
||||||
try_files $uri $uri/ __PATH__/__PATH__/index.php?$query_string;
|
try_files $uri $uri/ __PATH__/__PATH__/index.php?$query_string;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"website": "https://mineweb.org/",
|
"website": "https://mineweb.org/",
|
||||||
"admindoc": "https://docs.mineweb.org/",
|
"admindoc": "https://docs.mineweb.org/",
|
||||||
"code": "ttps://github.com/MineWeb/MineWebCMS/"
|
"code": "https://github.com/MineWeb/MineWebCMS/"
|
||||||
},
|
},
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
"email": "liberodark@gmail.com"
|
"email": "liberodark@gmail.com"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.2.4"
|
"yunohost": ">= 4.3.0"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
YNH_PHP_VERSION="7.3"
|
YNH_PHP_VERSION="7.3"
|
||||||
|
|
||||||
# dependencies used by the app
|
# 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
|
# PERSONAL HELPERS
|
||||||
|
|
|
@ -26,6 +26,7 @@ ynh_abort_if_errors
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url=$YNH_APP_ARG_PATH
|
path_url=$YNH_APP_ARG_PATH
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
|
phpversion=$YNH_PHP_VERSION
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
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=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=phpversion --value=$phpversion
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# INSTALL DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Installing dependencies..." --weight=1
|
||||||
|
|
||||||
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
|
@ -94,8 +103,7 @@ ynh_add_nginx_config
|
||||||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
|
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
# Create a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
ynh_add_fpm_config
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY A CONFIG FILE
|
# MODIFY A CONFIG 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
|
# Remove a database if it exists, along with the associated user
|
||||||
ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name
|
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
|
# REMOVE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -67,10 +67,17 @@ chown -R $app:www-data "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# 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_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
|
# RESTORE THE MYSQL DATABASE
|
||||||
|
|
|
@ -101,17 +101,25 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_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
|
# PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
|
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
# Create a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
ynh_add_fpm_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY A CONFIG FILE
|
# 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"
|
ynh_add_config --template="../conf/database.php" --destination="$final_path/app/Config/database.php"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue