mirror of
https://github.com/YunoHost-Apps/xbackbone_ynh.git
synced 2024-09-03 19:15:53 +02:00
commit
3c36737660
9 changed files with 48 additions and 33 deletions
|
@ -1,15 +1,27 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return array(
|
||||||
'base_url' => 'https://__DOMAIN____PATH__',
|
'base_url' => 'https://__DOMAIN____PATH__',
|
||||||
'storage' => [
|
'db' => array (
|
||||||
|
'connection' => 'mysql',
|
||||||
|
'dsn' => 'host=localhost;port=3306;dbname=__DB_USER__',
|
||||||
|
'username' => '__DB_USER__',
|
||||||
|
'password' => '__DB_PWD__',
|
||||||
|
),
|
||||||
|
|
||||||
|
'storage' => array(
|
||||||
'driver' => 'local',
|
'driver' => 'local',
|
||||||
'path' => '__DATA_DIR__/storage',
|
'path' => '__DATA_DIR__',
|
||||||
],
|
),
|
||||||
'db' => [
|
|
||||||
'connection' => 'sqlite',
|
'ldap' => array(
|
||||||
'dsn' => '__INSTALL_DIR__/resources/database/xbackbone.db',
|
'enabled' => true,
|
||||||
'username' => null,
|
'schema' => 'ldap',
|
||||||
'password' => null,
|
'host' => 'ldap://127.0.0.1',
|
||||||
]
|
'port' => 389,
|
||||||
];
|
'base_domain' => 'dc=yunohost,dc=org',
|
||||||
|
'search_filter' => '(&(|(objectclass=posixAccount))(uid={{username}})(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org))',
|
||||||
|
'user_domain' => 'ou=Users',
|
||||||
|
'rdn_attribute' => 'uid=',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
; Additional php.ini defines, specific to this pool of workers.
|
; Additional php.ini defines, specific to this pool of workers.
|
||||||
|
|
||||||
php_admin_value[upload_max_filesize] = 512M
|
php_admin_value[upload_max_filesize] = 1G
|
||||||
php_admin_value[post_max_size] = 512M
|
php_admin_value[post_max_size] = 1G
|
||||||
|
|
|
@ -6,7 +6,7 @@ location __PATH__/ {
|
||||||
|
|
||||||
index index.html index.htm index.php;
|
index index.html index.htm index.php;
|
||||||
|
|
||||||
client_max_body_size 512M;
|
client_max_body_size 1G;
|
||||||
|
|
||||||
try_files $uri $uri/ __PATH__/index.php;
|
try_files $uri $uri/ __PATH__/index.php;
|
||||||
|
|
||||||
|
|
|
@ -48,10 +48,13 @@ ram.runtime = "50M"
|
||||||
[resources.install_dir]
|
[resources.install_dir]
|
||||||
|
|
||||||
[resources.data_dir]
|
[resources.data_dir]
|
||||||
subdirs = ["storage"]
|
#subdirs = ["storage"]
|
||||||
|
|
||||||
[resources.permissions]
|
[resources.permissions]
|
||||||
main.url = "/"
|
main.url = "/"
|
||||||
|
|
||||||
[resources.apt]
|
[resources.apt]
|
||||||
packages = "mariadb-server php8.2-sqlite3 php8.2-gd php8.2-fileinfo php8.2-zip"
|
packages = "mariadb-server php8.2-intl php8.2-mysql php8.2-gd php8.2-fileinfo php8.2-zip php8.2-ldap"
|
||||||
|
|
||||||
|
[resources.database]
|
||||||
|
type = "mysql"
|
||||||
|
|
|
@ -39,13 +39,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# BACKUP THE MYSQL DATABASE
|
|
||||||
#=================================================
|
|
||||||
ynh_print_info --message="Backing up the MySQL database..."
|
|
||||||
|
|
||||||
ynh_mysql_dump_db --database="$db_name" > db.sql
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -15,7 +15,9 @@ source /usr/share/yunohost/helpers
|
||||||
ynh_script_progression --message="Setting up source files..." --weight=1
|
ynh_script_progression --message="Setting up source files..." --weight=1
|
||||||
|
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
#mkdir "$install_dir/storage"
|
|
||||||
|
mkdir "$install_dir/storage"
|
||||||
|
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -37,13 +37,6 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RESTORE THE MYSQL DATABASE
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Restoring the MySQL database..." --weight=1
|
|
||||||
|
|
||||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -24,11 +24,21 @@ then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
ynh_setup_source --dest_dir="$install_dir" --keep="config.php"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# XBACKBONE UPGRADE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Install database" --weight=1
|
||||||
|
|
||||||
|
pushd $install_dir
|
||||||
|
php$phpversion php/migrate --install
|
||||||
|
php$phpversion php/clean
|
||||||
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP-FPM CONFIGURATION
|
# PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -4,4 +4,6 @@ test_format = 1.0
|
||||||
|
|
||||||
# ------------
|
# ------------
|
||||||
# Tests to run
|
# Tests to run
|
||||||
# ------------
|
# ------------
|
||||||
|
|
||||||
|
exclude = ["install.root"]
|
||||||
|
|
Loading…
Add table
Reference in a new issue