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

Update install

This commit is contained in:
ericgaspar 2022-05-27 14:02:13 +02:00
parent 0854fe7426
commit 6a3ed70874
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -126,6 +126,20 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$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 # ADD A CONFIGURATION
#================================================= #=================================================
@ -141,20 +155,7 @@ ynh_add_config --template="../conf/.env" --destination="$final_path/.env"
chmod 400 "$final_path/.env" chmod 400 "$final_path/.env"
chown $app:$app "$final_path/.env" chown $app:$app "$final_path/.env"
#================================================= ynh_secure_remove --file="$final_path/key.txt"
# 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
#================================================= #=================================================
# INSTALL THE CRON FILE # INSTALL THE CRON FILE