From 9ba4fd585ebc988cea4e2117e88fbf08c6c75773 Mon Sep 17 00:00:00 2001 From: Marc Ordinas i Llopis Date: Mon, 13 Mar 2023 18:30:58 +0100 Subject: [PATCH] Basic improvements * Configure APP_URL, just in case. * Add fastcgi_buffers configuration, to make the OAuth callback work. * Set the default users to 'admins' by default. * Add needed dependency php8.2-xml. * Remove unnecessary config file managing in upgrade. * Remove env config panel, as the app does most of the work now. --- conf/.env | 3 +-- conf/nginx.conf | 7 +++++++ config_panel.toml | 8 -------- manifest.toml | 4 ++-- scripts/upgrade | 10 ---------- 5 files changed, 10 insertions(+), 22 deletions(-) diff --git a/conf/.env b/conf/.env index 733aafd..58d981c 100644 --- a/conf/.env +++ b/conf/.env @@ -237,6 +237,5 @@ APP_NAME=DataImporter # Don't open issues telling me it doesn't help because it's not supposed to. # Laravel uses this to generate links on the command line, which is a feature the data importer does not use. # -APP_URL=http://localhost - +APP_URL=https://__DOMAIN____PATH__ diff --git a/conf/nginx.conf b/conf/nginx.conf index db6b0ba..a0f22b8 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -23,6 +23,13 @@ location __PATH__/ { fastcgi_param REMOTE_USER $remote_user; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $request_filename; + + ################################ + # These should be tuned, but the authentication callback doesn't work without then + ################################ + fastcgi_buffers 16 32k; + fastcgi_buffer_size 64k; + fastcgi_busy_buffers_size 64k; } # Include SSOWAT user panel. diff --git a/config_panel.toml b/config_panel.toml index 91544b7..bf6428c 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -29,11 +29,3 @@ name = "Firefly-iii Data Importer configuration" default = "low" help = "low: Personal usage, behind the SSO. No RAM footprint when not used, but the impact on the processor can be high if many users are using the service.
medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.
high: High usage, frequently visited website. High RAM footprint, but lower on processor usage and quickly responding." -[env] -name = "Environment configuration" - [env.env_config] - [env.env_config.env_file] - ask = "Environment variables" - type = "text" - bind = "/var/www/__APP__/.env" - diff --git a/manifest.toml b/manifest.toml index b4d3820..b8026a6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -34,7 +34,7 @@ ram.runtime = "50M" [install.init_main_permission] type = "group" - default = "all_users" + default = "admins" [install.admin] type = "user" @@ -53,5 +53,5 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "php8.2-bcmath" + packages = "php8.2-xml php8.2-bcmath" diff --git a/scripts/upgrade b/scripts/upgrade index 31fae1d..6e8ee3c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -86,16 +86,6 @@ ynh_script_progression --message="Updating PHP dependencies..." ynh_exec_warn_less ynh_install_composer -#================================================= -# UPDATE A CONFIG FILE -#================================================= -# ynh_script_progression --message="Updating a configuration file..." - -# ynh_add_config --template="../conf/.env" --destination="$install_dir/.env" - -# chmod 400 "$install_dir/.env" -# chown $app "$install_dir/.env" - #================================================= # END OF SCRIPT #=================================================