From df854ee55c31b06a2bd9e2539a9be49d91f5c2e8 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 6 Nov 2020 21:56:57 +0100 Subject: [PATCH 1/8] Update install --- scripts/install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index ed3bdaa..fac2bbf 100755 --- a/scripts/install +++ b/scripts/install @@ -99,7 +99,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # INSTALL LYCHEE WITH COMPOSER #================================================= -ynh_script_progression --message="Installing ampache with composer..." --weight=45 +ynh_script_progression --message="Installing Lychee with Composer..." --weight=45 # Install composer ynh_install_composer --phpversion="${YNH_PHP_VERSION}" --workdir="$final_path" --install_args="--prefer-source --no-dev" @@ -115,7 +115,6 @@ cp ../conf/.env.example $final_path/.env ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/.env" ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="$final_path/.env" ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/.env" -#ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/.env" # setup application config cd $final_path && php$phpversion artisan key:generate -n --force --env @@ -135,7 +134,7 @@ ynh_store_file_checksum "$final_path/.env" # CREATE DIRECTORIES #================================================= -mkdir -p /home/yunohost.$app/{uploads,data} +mkdir -p /home/yunohost.${app}/{uploads,data} #================================================= # SECURE FILES AND DIRECTORIES @@ -143,7 +142,8 @@ mkdir -p /home/yunohost.$app/{uploads,data} # Set permissions to app files chown -R $app: $final_path -chmod -R 750 /home/yunohost.$app/{uploads,data} +chown -R $app: /home/yunohost.${app} +chmod -R 755 /home/yunohost.${app}/{uploads,data} #================================================= # SETUP SSOWAT From 0ca854ba7c2f2b15d19ef9874da4721281e40b7d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 6 Nov 2020 22:05:34 +0100 Subject: [PATCH 2/8] Update install --- scripts/install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index fac2bbf..e4c0ad4 100755 --- a/scripts/install +++ b/scripts/install @@ -134,7 +134,8 @@ ynh_store_file_checksum "$final_path/.env" # CREATE DIRECTORIES #================================================= -mkdir -p /home/yunohost.${app}/{uploads,data} +mkdir -p /home/yunohost.${app}/uploads +mkdir -p /home/yunohost.${app}/uploads/{big,medium,small,thumb,import} #================================================= # SECURE FILES AND DIRECTORIES @@ -143,7 +144,7 @@ mkdir -p /home/yunohost.${app}/{uploads,data} # Set permissions to app files chown -R $app: $final_path chown -R $app: /home/yunohost.${app} -chmod -R 755 /home/yunohost.${app}/{uploads,data} +chmod -R 755 /home/yunohost.${app}/uploads #================================================= # SETUP SSOWAT From 3cb343396d99d47f0ac1a0e16187c5864ef5c80c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 6 Nov 2020 22:18:20 +0100 Subject: [PATCH 3/8] Fix --- scripts/_common.sh | 2 +- scripts/install | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 29c612c..62b5714 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ YNH_PHP_VERSION=7.3 -extra_php_dependencies="php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-exif php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysqli php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-zip" +extra_php_dependencies="php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-exif php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysqli php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-zip" #================================================= # EXPERIMENTAL HELPERS diff --git a/scripts/install b/scripts/install index e4c0ad4..b92bce5 100755 --- a/scripts/install +++ b/scripts/install @@ -119,8 +119,8 @@ ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_fil # setup application config cd $final_path && php$phpversion artisan key:generate -n --force --env cd $final_path && php$phpversion artisan migrate -n --force -#cd $final_path && php$phpversion artisan config:clear -n -#cd $final_path && php$phpversion artisan config:cache -n +cd $final_path && php$phpversion artisan config:clear -n +cd $final_path && php$phpversion artisan config:cache -n #================================================= # STORE THE CONFIG FILE CHECKSUM From 211b330a6e0387df4f61d29a0ece1c4ab41faee7 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 6 Nov 2020 22:23:22 +0100 Subject: [PATCH 4/8] Fix --- conf/php-fpm.conf | 6 +++--- scripts/install | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index ab1a471..43fca0c 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -419,12 +419,12 @@ chdir = __FINALPATH__ ;php_admin_value[memory_limit] = 32M ; Common values to change to increase file upload limit -; php_admin_value[upload_max_filesize] = 50M -; php_admin_value[post_max_size] = 50M +php_admin_value[upload_max_filesize] = 200M +php_admin_value[post_max_size] = 200M ; php_admin_flag[mail.add_x_header] = Off ; Other common parameters -; php_admin_value[max_execution_time] = 600 +php_admin_value[max_execution_time] = 200 ; php_admin_value[max_input_time] = 300 ; php_admin_value[memory_limit] = 256M ; php_admin_flag[short_open_tag] = On diff --git a/scripts/install b/scripts/install index b92bce5..29ddc79 100755 --- a/scripts/install +++ b/scripts/install @@ -142,7 +142,7 @@ mkdir -p /home/yunohost.${app}/uploads/{big,medium,small,thumb,import} #================================================= # Set permissions to app files -chown -R $app: $final_path +chown -R www-data:www-data $final_path chown -R $app: /home/yunohost.${app} chmod -R 755 /home/yunohost.${app}/uploads From 6335e51ae97869ab79ecb9172c3a3a1869a47548 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 6 Nov 2020 22:27:01 +0100 Subject: [PATCH 5/8] Update install --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 29ddc79..0e9ca13 100755 --- a/scripts/install +++ b/scripts/install @@ -142,9 +142,9 @@ mkdir -p /home/yunohost.${app}/uploads/{big,medium,small,thumb,import} #================================================= # Set permissions to app files -chown -R www-data:www-data $final_path +chown -R $app: $final_path chown -R $app: /home/yunohost.${app} -chmod -R 755 /home/yunohost.${app}/uploads +chmod -R 750 /home/yunohost.${app}/uploads #================================================= # SETUP SSOWAT From 5e2199f35190c23bb970ae705d3201788058648d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 6 Nov 2020 22:37:36 +0100 Subject: [PATCH 6/8] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 0e9ca13..2a13920 100755 --- a/scripts/install +++ b/scripts/install @@ -144,7 +144,7 @@ mkdir -p /home/yunohost.${app}/uploads/{big,medium,small,thumb,import} # Set permissions to app files chown -R $app: $final_path chown -R $app: /home/yunohost.${app} -chmod -R 750 /home/yunohost.${app}/uploads +chmod -R 750 /home/yunohost.${app} #================================================= # SETUP SSOWAT From e545039fe44c0bd5ef55861c0aa2cffd9755290c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 6 Nov 2020 22:40:40 +0100 Subject: [PATCH 7/8] fix --- conf/.env.example | 4 ++-- scripts/install | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/.env.example b/conf/.env.example index 57d4ef9..80abada 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -32,8 +32,8 @@ DB_LOG_SQL=false TIMEZONE=UTC # folders in which the files will be stored -LYCHEE_DIST="/var/www/__APP__/public/dist/" -LYCHEE_UPLOADS="/home/yunohost.__APP__/uploads/" +#LYCHEE_DIST="/var/www/__APP__/public/dist/" +#LYCHEE_UPLOADS="/home/yunohost.__APP__/uploads/" # url to access those files # LYCHEE_DIST_URL="dist/" diff --git a/scripts/install b/scripts/install index 2a13920..f9ef137 100755 --- a/scripts/install +++ b/scripts/install @@ -134,8 +134,8 @@ 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} +#mkdir -p /home/yunohost.${app}/uploads +#mkdir -p /home/yunohost.${app}/uploads/{big,medium,small,thumb,import} #================================================= # SECURE FILES AND DIRECTORIES @@ -143,8 +143,8 @@ mkdir -p /home/yunohost.${app}/uploads/{big,medium,small,thumb,import} # Set permissions to app files chown -R $app: $final_path -chown -R $app: /home/yunohost.${app} -chmod -R 750 /home/yunohost.${app} +#chown -R $app: /home/yunohost.${app} +#chmod -R 750 /home/yunohost.${app} #================================================= # SETUP SSOWAT From 1cfa84361c0ea4bcc0bf748c51adb38b88febda6 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 6 Nov 2020 22:48:04 +0100 Subject: [PATCH 8/8] Update php-fpm.conf --- conf/php-fpm.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index 43fca0c..02a1984 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -419,12 +419,12 @@ chdir = __FINALPATH__ ;php_admin_value[memory_limit] = 32M ; Common values to change to increase file upload limit -php_admin_value[upload_max_filesize] = 200M -php_admin_value[post_max_size] = 200M +;php_admin_value[upload_max_filesize] = 200M +;php_admin_value[post_max_size] = 200M ; php_admin_flag[mail.add_x_header] = Off ; Other common parameters -php_admin_value[max_execution_time] = 200 +;php_admin_value[max_execution_time] = 200 ; php_admin_value[max_input_time] = 300 ; php_admin_value[memory_limit] = 256M ; php_admin_flag[short_open_tag] = On