diff --git a/conf/.env.example b/conf/.env.example index b7c1110..938defe 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -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 diff --git a/scripts/upgrade b/scripts/upgrade index 4f55a28..125665e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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