From ca6ce71ec86c22107a02c504ad38cef0c65645dd Mon Sep 17 00:00:00 2001 From: jgoutin Date: Wed, 13 Sep 2023 18:59:44 +0200 Subject: [PATCH] nextcloud: Update for Nextcloud 27 / Nextcloud Hub 5 --- roles/nextcloud/files/nginx-site-nextcloud.j2 | 12 +++++++++++- roles/nextcloud/tasks/dependencies.yml | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/roles/nextcloud/files/nginx-site-nextcloud.j2 b/roles/nextcloud/files/nginx-site-nextcloud.j2 index 5078777..c99cf9c 100644 --- a/roles/nextcloud/files/nginx-site-nextcloud.j2 +++ b/roles/nextcloud/files/nginx-site-nextcloud.j2 @@ -22,6 +22,15 @@ # Path to the root of your installation root /var/www/nextcloud; + # Add .mjs as a file extension for javascript + # Either include it in the default mime.types list + # or include you can include that list explicitly and add the file extension + # only for Nextcloud like below: + include mime.types; + types { + text/javascript js mjs; + } + # Specify how to handle directories -- specifying `/index.php$request_uri` # here as the fallback means that Nginx always exhibits the desired behaviour # when a client requests a path that corresponds to a directory that exists @@ -92,7 +101,8 @@ fastcgi_max_temp_file_size 0; } - location ~ \.(?:css|js|svg|gif|png|jpg|ico|wasm|tflite|map)$ { + # Serve static files + location ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map)$ { try_files $uri /index.php$request_uri; add_header Cache-Control "public, max-age=15778463, immutable"; access_log off; # Optional: Don't log access to assets diff --git a/roles/nextcloud/tasks/dependencies.yml b/roles/nextcloud/tasks/dependencies.yml index bbd8214..9e9b7b5 100644 --- a/roles/nextcloud/tasks/dependencies.yml +++ b/roles/nextcloud/tasks/dependencies.yml @@ -12,6 +12,7 @@ ansible.builtin.include_role: name: jgoutin.home.php_fpm vars: + php_version: "8.2" php_fpm_user: nextcloud php_fpm_site: nextcloud php_fpm_domain: "{{ nextcloud_domain }}"