mirror of
https://github.com/YunoHost-Apps/my_webapp_ynh.git
synced 2024-09-03 19:46:26 +02:00
commit
ec83a54c90
5 changed files with 16 additions and 7 deletions
|
@ -5,7 +5,7 @@
|
|||
with_sftp=1
|
||||
password="myreallystrengthpassword"
|
||||
is_public=1
|
||||
phpversion="7.3"
|
||||
phpversion="7.4"
|
||||
with_mysql=1
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
|
@ -27,7 +27,7 @@
|
|||
with_sftp=0
|
||||
password=""
|
||||
is_public=1
|
||||
phpversion="7.3"
|
||||
phpversion="7.4"
|
||||
with_mysql=1
|
||||
; Checks
|
||||
setup_sub_dir=1
|
||||
|
@ -40,7 +40,7 @@
|
|||
with_sftp=1
|
||||
password="myreallystrengthpassword"
|
||||
is_public=1
|
||||
phpversion="7.3"
|
||||
phpversion="7.4"
|
||||
with_mysql=0
|
||||
; Checks
|
||||
setup_sub_dir=1
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Custom Web app with SFTP access to serve static (HTML, CSS, JS) and PHP files",
|
||||
"fr": "Application Web personnalisée avec accès SFTP pour servir des fichiers statiques (HTML, CSS, JS) et PHP"
|
||||
},
|
||||
"version": "1.0~ynh9",
|
||||
"version": "1.0~ynh10",
|
||||
"url": "https://github.com/YunoHost-Apps/my_webapp_ynh",
|
||||
"license": "GPL-3.0-only",
|
||||
"maintainer": {
|
||||
|
@ -18,12 +18,12 @@
|
|||
"email": "maniackc_dev@crudelis.fr"
|
||||
}],
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.3.3"
|
||||
"yunohost": ">= 11.0.9"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
"nginx",
|
||||
"php7.3-fpm",
|
||||
"php7.4-fpm",
|
||||
"mysql"
|
||||
],
|
||||
"arguments": {
|
||||
|
@ -65,7 +65,7 @@
|
|||
"fr": "Choisissez une version PHP que vous souhaitez utiliser pour votre application"
|
||||
},
|
||||
"choices" : ["none", "7.3", "7.4", "8.0"],
|
||||
"default" : "7.3"
|
||||
"default" : "7.4"
|
||||
},
|
||||
{
|
||||
"name": "with_mysql",
|
||||
|
|
|
@ -78,6 +78,8 @@ if [ $with_mysql -eq 1 ]
|
|||
then
|
||||
ynh_script_progression --message="Creating a MySQL database..." --weight=2
|
||||
|
||||
ynh_install_app_dependencies "php${phpversion}-mysql"
|
||||
|
||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||
ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name
|
||||
|
|
|
@ -66,6 +66,8 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
if [ $with_mysql -eq 1 ]; then
|
||||
ynh_script_progression --message="Restoring the MySQL database..."
|
||||
|
||||
ynh_install_app_dependencies "php${phpversion}-mysql"
|
||||
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$db_pwd
|
||||
ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ./db.sql
|
||||
|
|
|
@ -132,6 +132,11 @@ then
|
|||
ynh_install_app_dependencies "php${phpversion}-fpm"
|
||||
fi
|
||||
|
||||
if [ $with_mysql -eq 1 ]
|
||||
then
|
||||
ynh_install_app_dependencies "php${phpversion}-mysql"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue