mirror of
https://github.com/YunoHost-Apps/bookstack_ynh.git
synced 2024-09-03 18:16:02 +02:00
Merge branch 'Fix-upgrade' into testing
This commit is contained in:
commit
c04cbf6cb0
2 changed files with 11 additions and 20 deletions
|
@ -6,6 +6,11 @@
|
|||
# NOTE: If any of your values contain a space or a hash you will need to
|
||||
# wrap the entire value in quotes. (eg. MAIL_FROM_NAME="BookStack Mailer")
|
||||
|
||||
# Enable debug mode
|
||||
# Shows advanced debug information and errors.
|
||||
# CAN EXPOSE OTHER VARIABLES, LEAVE DISABLED
|
||||
APP_DEBUG=false
|
||||
|
||||
# Application key
|
||||
APP_KEY=SomeRandomString
|
||||
|
||||
|
@ -67,3 +72,7 @@ SESSION_DRIVER=redis
|
|||
|
||||
# Example of using a single local Redis server
|
||||
REDIS_SERVERS=127.0.0.1:6379:__REDIS_DB__
|
||||
|
||||
# Storage system to use
|
||||
# Can be 'local', 'local_secure' or 's3'
|
||||
STORAGE_TYPE=local
|
||||
|
|
|
@ -63,26 +63,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
|
||||
# Create a temporary directory
|
||||
tmpdir="$(mktemp -d)"
|
||||
|
||||
#cp -a "$final_path/.env " "$tmpdir/.env "
|
||||
[[ -f "$final_path/public/uploads" ]] && cp -a "$final_path/public/uploads" "$tmpdir/public/uploads/"
|
||||
[[ -f "$final_path/storage/uploads" ]] && cp -a "$final_path/storage/uploads" "$tmpdir/storage/uploads/"
|
||||
# Remove the app directory securely
|
||||
|
||||
ynh_secure_remove --file=$final_path
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
|
||||
#cp -a "$tmpdir/.env " "$final_path/.env "
|
||||
[[ -f "$tmpdir/public/uploads" ]] && cp -a "$tmpdir/public/uploads/" "$final_path/public/uploads"
|
||||
[[ -f "$tmpdir/storage/uploads" ]] && cp -a "$tmpdir/storage/uploads/" "$final_path/storage/uploads"
|
||||
|
||||
# Remove the tmp directory securely
|
||||
ynh_secure_remove --file="$tmpdir"
|
||||
|
||||
ynh_add_config --template=../conf/.env.example --destination=$final_path/.env
|
||||
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/.env $final_path/public/uploads $final_path/storage/uploads"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
@ -132,7 +114,7 @@ popd
|
|||
chmod 755 $final_path
|
||||
chmod -R o-rwx $final_path
|
||||
chown -R $app:www-data $final_path
|
||||
chmod 600 $final_path/.env
|
||||
#chmod 600 $final_path/.env
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
Loading…
Add table
Reference in a new issue