diff --git a/check_process b/check_process index 4f8440e..a75cdc3 100644 --- a/check_process +++ b/check_process @@ -6,7 +6,7 @@ ;; Test complet ; Manifest domain="domain.tld" (DOMAIN) - path="/" (PATH) + path="/path" (PATH) language="fr" is_public=1 (PUBLIC|public=1|private=0) ; Checks diff --git a/conf/.env.example b/conf/.env.example index 98e8f24..56fff24 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -49,7 +49,7 @@ MAIL_PASSWORD=null MAIL_ENCRYPTION=null # General auth -AUTH_METHOD=ldap +AUTH_METHOD=standard # The LDAP host, Adding a port is optional LDAP_SERVER=ldap://127.0.0.1:389 @@ -68,7 +68,7 @@ LDAP_PASS=false # The user-provided user-name used to replace any occurrences of '${user}' # If you're setting this option via other means, such as within a docker-compose.yml, # you may need escape the $, often using $$ or \$ instead. -LDAP_USER_FILTER=(&(uid=${user})) +LDAP_USER_FILTER=(&(|(objectclass=posixAccount))(uid={{username}})(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org)) # Set the LDAP version to use when connecting to the server LDAP_VERSION=false diff --git a/conf/nginx.conf b/conf/nginx.conf index b346212..62b5830 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,11 +9,13 @@ location __PATH__/ { rewrite ^ https://$server_name$request_uri? permanent; } + client_max_body_size 100m; + client_body_timeout 120s; # Default is 60, May need to be increased for very large uploads + index index.php; - #try_files $uri $uri/ @bookstack; - - try_files $uri $uri/ /index.php?$query_string; + try_files $uri $uri/ @bookstack; + #try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; @@ -28,6 +30,6 @@ location __PATH__/ { include conf.d/yunohost_panel.conf.inc; } -#location @bookstack { -# rewrite ^__PATH__/(.*)$ __PATH__/index.php?/$1 last; -#} +location @bookstack { + rewrite ^__PATH__/(.*)$ __PATH__/index.php?/$1 last; +} diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index ab1a471..085132b 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] = 50M +php_admin_value[post_max_size] = 50M ; php_admin_flag[mail.add_x_header] = Off ; Other common parameters ; php_admin_value[max_execution_time] = 600 ; php_admin_value[max_input_time] = 300 -; php_admin_value[memory_limit] = 256M +php_admin_value[memory_limit] = 256M ; php_admin_flag[short_open_tag] = On diff --git a/manifest.json b/manifest.json index 6d1ea0f..e7a08f8 100644 --- a/manifest.json +++ b/manifest.json @@ -39,8 +39,8 @@ "en": "Choose a path for BookStack", "fr": "Choisissez un chemin pour BookStack" }, - "example": "/", - "default": "/" + "example": "/bookstack", + "default": "/bookstack" }, { "name": "language", @@ -49,7 +49,7 @@ "en": "Choose the application language", "fr": "Choisissez la langue de l'application" }, - "choices": ["de", "en", "es", "fr", "it", "pt"], + "choices": ["de", "en", "es", "fr", "it", "nl"], "default": "en" }, { diff --git a/scripts/install b/scripts/install index 834e304..4513d53 100644 --- a/scripts/install +++ b/scripts/install @@ -21,7 +21,7 @@ ynh_abort_if_errors # Retrieve arguments domain=$YNH_APP_ARG_DOMAIN -path_url="/" +path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC language=$YNH_APP_ARG_LANGUAGE @@ -109,6 +109,7 @@ ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --targ ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/.env" ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$final_path/.env" ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/.env" +ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/.env" ynh_store_file_checksum $final_path/.env diff --git a/scripts/upgrade b/scripts/upgrade index 364bb79..5fc46a6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -95,6 +95,24 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config --package="$extra_php_dependencies" +#================================================= +# INSTALL AND INITIALIZE COMPOSER +#================================================= +ynh_script_progression --message="Installing Composer..." --weight=10 + +# Install Composer +ynh_install_composer --phpversion=$phpversion --workdir=$final_path --install_args="--no-dev" + +if [ "$upgrade_type" == "UPGRADE_APP" ] +then + ynh_script_progression --message="Upgrading source files..." --weight=4 + pushd $final_path + php$phpversion artisan migrate + php$phpversion artisan cache:clear + php$phpversion artisan view:clear + popd +fi + #================================================= # GENERIC FINALIZATION #=================================================