Commit 31b1981a authored by C1t1z3n 0n3's avatar C1t1z3n 0n3

Update install

parent 328c3440
......@@ -62,7 +62,7 @@ ynh_install_app_dependencies "$pkg_dependencies"
#=================================================
ynh_print_info --message="Installing php..."
ynh_install_php --phpversion="7.2" --package="$extra_pkg_dependencies"
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
#=================================================
# CREATE A POSTGRESQL DATABASE
......@@ -71,11 +71,11 @@ ynh_print_info --message="Creating a PostgreSQL database..."
ynh_psql_test_if_first_run
db_name=$(ynh_sanitize_dbid "$app")
db_name=$(ynh_sanitize_dbid --db_name=$app)
db_user=$db_name
db_pwd=$(ynh_string_random)
db_pwd=$(ynh_string_random --length=32)
ynh_app_setting_set --app="$app" --key=db_name --value="$db_name"
ynh_app_setting_set --app="$app" --key=db_pwd --value="$db_pwd"
ynh_app_setting_set --app="$app" --key=db_pwd --value="$db_pwd"
# Initialize database and store postgres password for upgrade
ynh_psql_setup_db --db_user="$db_user" --db_name="$db_name" --db_pwd="$db_pwd"
......@@ -110,7 +110,7 @@ ynh_system_user_create --username="$app"
ynh_print_info --message="Configuring php-fpm..."
# Create a dedicated php-fpm config
ynh_add_fpm_config --phpversion="7.2"
ynh_add_fpm_config --phpversion="7.3"
#=================================================
# INSTALL PHP DEPENDENCIES
......@@ -118,12 +118,12 @@ ynh_add_fpm_config --phpversion="7.2"
chown -R "$app": "$final_path"
ynh_install_composer --phpversion="7.2" --workdir="$final_path"
ynh_install_composer --phpversion="7.3" --workdir="$final_path"
# Fix Google Recaptcha removal
ynh_secure_remove --file="$final_path/bootstrap/cache"
mkdir -p "$final_path/bootstrap/cache"
ynh_composer_exec --phpversion="7.2" --workdir="$final_path" --commands="dump-autoload"
ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="dump-autoload"
#=================================================
# SPECIFIC SETUP
......@@ -162,17 +162,17 @@ ynh_store_file_checksum --file="$config"
#=================================================
pushd "$final_path"
php7.2 artisan -n key:generate --force
php7.2 artisan horizon:install
php7.2 artisan config:clear
php7.2 artisan config:cache
php7.2 artisan route:cache
php7.2 artisan view:cache
php7.2 artisan storage:link
php7.2 artisan migrate --force
php7.2 artisan update
php7.2 artisan horizon:purge
php7.2 artisan horizon:assets
php7.3 artisan -n key:generate --force
php7.3 artisan horizon:install
php7.3 artisan config:clear
php7.3 artisan config:cache
php7.3 artisan route:cache
php7.3 artisan view:cache
php7.3 artisan storage:link
php7.3 artisan migrate --force
php7.3 artisan update
php7.3 artisan horizon:purge
php7.3 artisan horizon:assets
popd
#=================================================
......@@ -222,4 +222,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT
#=================================================
ynh_print_info --message="Installation of $app completed"
ynh_print_info --message="Installation of $app completed"
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment