mirror of
https://github.com/YunoHost-Apps/lychee_ynh.git
synced 2024-09-03 19:36:36 +02:00
Update upgrade
This commit is contained in:
parent
dd2de0ef5d
commit
40f7b069c2
1 changed files with 19 additions and 6 deletions
|
@ -108,15 +108,11 @@ then
|
||||||
# Remove the tmp directory securely
|
# Remove the tmp directory securely
|
||||||
ynh_secure_remove --file="$tmpdir"
|
ynh_secure_remove --file="$tmpdir"
|
||||||
|
|
||||||
ynh_install_composer --workdir="$final_path" --install_args="--prefer-source --no-dev"
|
ynh_install_composer --workdir="$final_path" --install_args="--no-dev"
|
||||||
|
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
php$phpversion artisan migrate -n --force
|
php$phpversion artisan migrate #-n --force
|
||||||
popd
|
popd
|
||||||
|
|
||||||
ynh_backup_if_checksum_is_different --file="$final_path/.env"
|
|
||||||
# Recalculate and store the checksum of the file for the next upgrade.
|
|
||||||
ynh_store_file_checksum --file="$final_path/.env"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -150,6 +146,23 @@ 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 --usage=low --footprint=low --package="$extra_php_dependencies"
|
ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# BUILDING
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Building..."
|
||||||
|
|
||||||
|
ynh_backup_if_checksum_is_different --file="$final_path/.env"
|
||||||
|
# Setup application config
|
||||||
|
cp ../conf/.env.example $final_path/.env
|
||||||
|
|
||||||
|
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/.env"
|
||||||
|
ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="$final_path/.env"
|
||||||
|
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$final_path/.env"
|
||||||
|
ynh_replace_string --match_string="__PUBLICPATH__" --replace_string="$public_path" --target_file="$final_path/.env"
|
||||||
|
|
||||||
|
# Recalculate and store the checksum of the file for the next upgrade.
|
||||||
|
ynh_store_file_checksum --file="$final_path/.env"
|
||||||
|
|
||||||
# SECURE FILES AND DIRECTORIES
|
# SECURE FILES AND DIRECTORIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue