diff --git a/scripts/install b/scripts/install index 020fae0..5f667f9 100755 --- a/scripts/install +++ b/scripts/install @@ -126,6 +126,20 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# DEPLOY +#================================================= +ynh_script_progression --message="Deploying..." + +pushd "$final_path" + ynh_use_nodejs + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn run production + ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan setup:production --force --email=$email --password="$password" + ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan passport:client --password -n > key.txt + ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan config:cache +popd + #================================================= # ADD A CONFIGURATION #================================================= @@ -141,20 +155,7 @@ ynh_add_config --template="../conf/.env" --destination="$final_path/.env" chmod 400 "$final_path/.env" chown $app:$app "$final_path/.env" -#================================================= -# DEPLOY -#================================================= -ynh_script_progression --message="Deploying..." - -pushd "$final_path" - ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn run production - ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan setup:production --force --email=$email --password="$password" - ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan passport:client --password -n > key.txt - #ynh_secure_remove --file="$final_path/key.txt" - ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan config:cache -popd +ynh_secure_remove --file="$final_path/key.txt" #================================================= # INSTALL THE CRON FILE