mirror of
https://github.com/YunoHost-Apps/castopod_ynh.git
synced 2024-09-03 18:16:14 +02:00
Merge branch 'testing' into data_dir
This commit is contained in:
commit
34d8268678
7 changed files with 20 additions and 37 deletions
|
@ -18,9 +18,6 @@ media.baseURL="https://__DOMAIN__"
|
||||||
admin.gateway="cp-admin"
|
admin.gateway="cp-admin"
|
||||||
auth.gateway="cp-auth"
|
auth.gateway="cp-auth"
|
||||||
|
|
||||||
#media.root="media"
|
|
||||||
#media.storage="__DATA_DIR__"
|
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
# Database configuration
|
# Database configuration
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
|
|
|
@ -23,7 +23,7 @@ multi_instance = true
|
||||||
ldap = false
|
ldap = false
|
||||||
sso = false
|
sso = false
|
||||||
disk = "50M"
|
disk = "50M"
|
||||||
ram.build = "100M"
|
ram.build = "150M"
|
||||||
ram.runtime = "50M"
|
ram.runtime = "50M"
|
||||||
|
|
||||||
[install]
|
[install]
|
||||||
|
|
|
@ -20,13 +20,6 @@ ynh_print_info --message="Declaring files to be backed up..."
|
||||||
|
|
||||||
ynh_backup --src_path="$install_dir"
|
ynh_backup --src_path="$install_dir"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# BACKUP THE DATA DIR
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Only relevant if there is a "data_dir" resource for this app
|
|
||||||
ynh_backup --src_path="$data_dir" --is_big
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE NGINX CONFIGURATION
|
# BACKUP THE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -16,7 +16,6 @@ source /usr/share/yunohost/helpers
|
||||||
fpm_footprint="low"
|
fpm_footprint="low"
|
||||||
fpm_free_footprint=0
|
fpm_free_footprint=0
|
||||||
fpm_usage="low"
|
fpm_usage="low"
|
||||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
|
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
|
||||||
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
|
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
|
||||||
|
@ -65,6 +64,15 @@ ynh_add_config --template="../conf/.env.example" --destination="$install_dir/.en
|
||||||
chmod 600 $install_dir/.env
|
chmod 600 $install_dir/.env
|
||||||
chown $app:www-data "$install_dir/.env"
|
chown $app:www-data "$install_dir/.env"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# RUN MIGRATIONS
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring $app database..." --weight=1
|
||||||
|
|
||||||
|
pushd $install_dir
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app php${phpversion} spark migrate --all
|
||||||
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -9,13 +9,6 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# LOAD SETTINGS
|
|
||||||
#=================================================
|
|
||||||
# ynh_script_progression --message="Loading installation settings..." --weight=1
|
|
||||||
|
|
||||||
# redis_db=$(ynh_app_setting_get --app=$app --key=redis_db)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE THE REDIS DATABASE
|
# REMOVE THE REDIS DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -20,16 +20,6 @@ ynh_restore_file --origin_path="$install_dir"
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RESTORE THE DATA DIRECTORY
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Restoring the data directory..." --weight=1
|
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
|
||||||
|
|
||||||
# (Same as for install dir)
|
|
||||||
chown -R $app:www-data "$data_dir"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE MYSQL DATABASE
|
# RESTORE THE MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -72,22 +72,24 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
||||||
chown root: "/etc/cron.d/$app"
|
chown root: "/etc/cron.d/$app"
|
||||||
chmod 644 "/etc/cron.d/$app"
|
chmod 644 "/etc/cron.d/$app"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CONFIGURE CASTOPOD DATABASE
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Configuring Castopod database..." --weight=1
|
|
||||||
|
|
||||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < "../conf/v1.5.2.sql"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD CONFIGURE
|
# ADD CONFIGURE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring Castopod..." --weight=1
|
ynh_script_progression --message="Configuring $app..." --weight=1
|
||||||
|
|
||||||
ynh_add_config --template="../conf/.env.example" --destination="$install_dir/.env"
|
ynh_add_config --template="../conf/.env.example" --destination="$install_dir/.env"
|
||||||
chmod 600 $install_dir/.env
|
chmod 600 $install_dir/.env
|
||||||
chown $app:www-data "$install_dir/.env"
|
chown $app:www-data "$install_dir/.env"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# RUN MIGRATIONS
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring $app database..." --weight=1
|
||||||
|
|
||||||
|
pushd $install_dir
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app php${phpversion} spark migrate --all
|
||||||
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue