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

Improvements in installtion and upgrade

This commit is contained in:
anmol26s 2018-06-22 00:15:07 +05:30
parent fa4f4b8f03
commit 8e9beb5a14
3 changed files with 5 additions and 14 deletions

View file

@ -72,7 +72,6 @@ ynh_app_setting_set $app random_key $random_key
#=================================================
ynh_install_php7
ynh_install_nodejs 9
#=================================================
# CREATE A MYSQL DATABASE
@ -134,17 +133,8 @@ ynh_replace_string "yunodomain" "$domain" "$final_path/.env"
ynh_replace_string "language" "$language" "$final_path/.env"
# Install nodejs packages
cd $final_path && sudo_path npm install
cd $final_path && sudo_path npm run production
# setup application config
cd $final_path && sudo /usr/bin/php7.1 artisan config:clear
cd $final_path && sudo /usr/bin/php7.1 artisan -q migrate --force
cd $final_path && sudo /usr/bin/php7.1 artisan -q storage:link
cd $final_path && sudo /usr/bin/php7.1 artisan -q setup:production --force
cd $final_path && sudo /usr/bin/php7.1 artisan monica:update --force
# create a cronjob to run the scheduler
echo "* * * * * -u $app /usr/bin/php7.1 $final_path/artisan schedule:run" > /tmp/cron$app

View file

@ -49,7 +49,6 @@ test ! -d $final_path \
# Define and install dependencies
ynh_install_php7
ynh_install_nodejs 9
#=================================================
# RESTORE THE NGINX CONFIGURATION
@ -85,7 +84,7 @@ ynh_system_user_create $app
#=================================================
# Run migration
cd $final_path && sudo /usr/bin/php7.1 artisan migrate --force
cd $final_path && sudo /usr/bin/php7.1 artisan monica:update --force
#=================================================

View file

@ -114,7 +114,9 @@ ynh_replace_string "yunomail" "$email" "$final_path/.env"
ynh_replace_string "yunodomain" "$domain" "$final_path/.env"
ynh_replace_string "language" "$language" "$final_path/.env"
cd $final_path && sudo /usr/bin/php7.1 artisan migrate --force
# Run monica update
cd $final_path && sudo /usr/bin/php7.1 artisan monica:update --force
#=================================================
# GENERIC FINALIZATION