1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/invoiceninja5_ynh.git synced 2024-09-03 19:26:23 +02:00

store app key in yunohost so upgrade works

This commit is contained in:
Sebastian Gumprich 2021-10-30 20:54:48 +02:00
parent d4e46312f1
commit 1d51c3dc81

View file

@ -125,6 +125,10 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
ynh_script_progression --message="Modifying a config file..." ynh_script_progression --message="Modifying a config file..."
# generate app key and save it as a environment variable
app_key="php$phpversion artisan key:generate --show"
ynh_app_setting_set --app=$app --key=app_key --value=$app_key
ynh_add_config --template="default.env" --destination="$final_path/.env" ynh_add_config --template="default.env" --destination="$final_path/.env"
chmod 400 "$final_path/.env" chmod 400 "$final_path/.env"
@ -144,7 +148,6 @@ ynh_script_progression --message="Building the application..."
pushd "$final_path" pushd "$final_path"
# Run the database migrations and initially fill the db # Run the database migrations and initially fill the db
php$phpversion artisan key:generate --no-interaction --verbose
php$phpversion artisan migrate:fresh --seed --no-interaction --verbose --force php$phpversion artisan migrate:fresh --seed --no-interaction --verbose --force
php$phpversion artisan ninja:create-account --email $email --password changeme --no-interaction --verbose php$phpversion artisan ninja:create-account --email $email --password changeme --no-interaction --verbose
php$phpversion artisan optimize --no-interaction --verbose php$phpversion artisan optimize --no-interaction --verbose