1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/bookstack_ynh.git synced 2024-09-03 18:16:02 +02:00
This commit is contained in:
liberodark 2019-07-29 20:06:17 +02:00
parent a2f00bb65e
commit a87a08cd61

View file

@ -100,25 +100,12 @@ ynh_mysql_setup_db $db_name $db_name
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_print_info "Download BookStack"
ynh_app_setting_set $app final_path $final_path ynh_app_setting_set $app final_path $final_path
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source "$final_path" ynh_setup_source "$final_path"
#=================================================
# SPECIFIC SETUP
#=================================================
# setup application config
cp -a ../conf/.env.example $final_path/.env
#=================================================
# MODIFY A CONFIG FILE
#=================================================
ynh_replace_string "yunouser" "$db_name" "$final_path/.env"
ynh_replace_string "yunopass" "$db_pwd" "$final_path/.env"
ynh_replace_string "yunobase" "$db_name" "$final_path/.env"
#================================================= #=================================================
# INSTALL COMPOSER # INSTALL COMPOSER
#================================================= #=================================================
@ -140,6 +127,43 @@ else
exit 1 exit 1
fi fi
#=================================================
# INSTALL BOOKSTACK DEPS
#=================================================
ynh_print_info "Install BookStack composer dependancies"
pushd $final_path || exit
php composer.phar install
popd || exit
#=================================================
# SPECIFIC SETUP
#=================================================
# setup application config
cp -a ../conf/.env.example $final_path/.env
#=================================================
# MODIFY A CONFIG FILE
#=================================================
ynh_replace_string "yunouser" "$db_name" "$final_path/.env"
ynh_replace_string "yunopass" "$db_pwd" "$final_path/.env"
ynh_replace_string "yunobase" "$db_name" "$final_path/.env"
#=================================================
# FINAL BOOKSTACK INSTALL
#=================================================
ynh_print_info "Install BookStack"
pushd $final_path || exit
php artisan key:generate --no-interaction --force
php artisan migrate --no-interaction --force
chown www-data:www-data -R bootstrap/cache public/uploads storage && chmod -R 755 bootstrap/cache public/uploads storage
popd || exit
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================