mirror of
https://github.com/YunoHost-Apps/lychee_ynh.git
synced 2024-09-03 19:36:36 +02:00
Fix
This commit is contained in:
parent
85ccc5216c
commit
77a4ae4f30
5 changed files with 18 additions and 9 deletions
|
@ -33,7 +33,7 @@ TIMEZONE=UTC
|
|||
|
||||
# folders in which the files will be stored
|
||||
LYCHEE_DIST="/var/www/__APP__/public/dist/"
|
||||
LYCHEE_UPLOADS="/home/yunohost.__APP__/uploads/"
|
||||
LYCHEE_UPLOADS="/home/yunohost.app/__APP__/uploads/"
|
||||
|
||||
# url to access those files
|
||||
# LYCHEE_DIST_URL="dist/"
|
||||
|
|
|
@ -27,7 +27,10 @@ location ^~ __PATH__/ {
|
|||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param REMOTE_USER $remote_user;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
|
||||
location __PATH__/uploads/ {
|
||||
alias __PUBLIC_PATH__/uploads/ ;
|
||||
}
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
|
|
|
@ -33,9 +33,14 @@ ynh_script_progression --message="Validating installation parameters..." --weigh
|
|||
final_path=/var/www/$app
|
||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||
|
||||
public_path=/home/yunohost.app/$app
|
||||
test ! -e "${public_path}" || ynh_die --message="$public_path already exists"
|
||||
|
||||
# Register (book) web path
|
||||
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
||||
|
||||
ynh_app_setting_set --app=$app --key=public_path --value=$public_path
|
||||
|
||||
#=================================================
|
||||
# STORE SETTINGS FROM MANIFEST
|
||||
#=================================================
|
||||
|
@ -104,8 +109,6 @@ ynh_script_progression --message="Installing Lychee with Composer..." --weight=1
|
|||
# Install composer
|
||||
ynh_install_composer
|
||||
|
||||
#ynh_composer_exec --phpversion="$phpversion" --workdir="$final_path" --commands="update --lock"
|
||||
|
||||
#=================================================
|
||||
# BUILDING
|
||||
#=================================================
|
||||
|
@ -141,8 +144,11 @@ ynh_store_file_checksum "$final_path/.env"
|
|||
# CREATE DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
mkdir -p /home/yunohost.$app/uploads
|
||||
mkdir -p /home/yunohost.$app/uploads/{big,medium,small,thumb,import,raw}
|
||||
mkdir -p $public_path/uploads
|
||||
mkdir -p $public_path/uploads/{big,import,medium,raw,small,thumb,raw}
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config "public_path"
|
||||
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
|
@ -150,8 +156,8 @@ mkdir -p /home/yunohost.$app/uploads/{big,medium,small,thumb,import,raw}
|
|||
|
||||
# Set permissions to app files
|
||||
chown -R $app: $final_path
|
||||
chown -R $app: /home/yunohost.$app
|
||||
chmod -R 755 /home/yunohost.$app
|
||||
chown -R $app: $public_path
|
||||
chmod -R 755 $public_path
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
|
|
|
@ -83,7 +83,7 @@ ynh_restore_file --origin_path="/home/yunohost.$app" --not_mandatory
|
|||
|
||||
# Restore permissions on app files
|
||||
chown -R $app: $final_path
|
||||
chmod -R 755 /home/yunohost.$app
|
||||
chmod -R 755 $public_path
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
|
|
|
@ -146,7 +146,7 @@ ynh_store_file_checksum --file="$final_path/.env"
|
|||
|
||||
# Set permissions on app files
|
||||
chown -R $app: $final_path
|
||||
chmod -R 755 /home/yunohost.$app
|
||||
chmod -R 755 $public_path
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
Loading…
Add table
Reference in a new issue