From a59dcfc89002828331ee8eee6fda2d02af4897a5 Mon Sep 17 00:00:00 2001 From: Milan Date: Thu, 18 Jan 2024 17:03:02 +0100 Subject: [PATCH 1/3] nginx: fix missing ttf static files --- nginx/development | 2 +- nginx/production | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx/development b/nginx/development index 64cd1b911..0054c8c26 100644 --- a/nginx/development +++ b/nginx/development @@ -64,7 +64,7 @@ server { # directly serve images and static files from the # bookwyrm filesystem using sendfile. # make the logs quieter by not reporting these requests - location ~ \.(bmp|ico|jpg|jpeg|png|tif|tiff|webp|css|js)$ { + location ~ \.(bmp|ico|jpg|jpeg|png|tif|tiff|ttf|webp|css|js)$ { root /app; try_files $uri =404; add_header X-Cache-Status STATIC; diff --git a/nginx/production b/nginx/production index 76ed19449..7cc0bad22 100644 --- a/nginx/production +++ b/nginx/production @@ -96,7 +96,7 @@ server { # # directly serve images and static files from the # # bookwyrm filesystem using sendfile. # # make the logs quieter by not reporting these requests -# location ~ \.(bmp|ico|jpg|jpeg|png|tif|tiff|webp|css|js)$ { +# location ~ \.(bmp|ico|jpg|jpeg|png|tif|tiff|ttf|webp|css|js)$ { # root /app; # try_files $uri =404; # add_header X-Cache-Status STATIC; From dd5c314bd5e0808ecaedbf31447fd4edc4a3ea06 Mon Sep 17 00:00:00 2001 From: Milan Date: Thu, 18 Jan 2024 22:29:43 +0100 Subject: [PATCH 2/3] nginx: also serve svg static files --- nginx/development | 2 +- nginx/production | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx/development b/nginx/development index 0054c8c26..fdfd14e1d 100644 --- a/nginx/development +++ b/nginx/development @@ -64,7 +64,7 @@ server { # directly serve images and static files from the # bookwyrm filesystem using sendfile. # make the logs quieter by not reporting these requests - location ~ \.(bmp|ico|jpg|jpeg|png|tif|tiff|ttf|webp|css|js)$ { + location ~ \.(bmp|ico|jpg|jpeg|png|svg|tif|tiff|ttf|webp|css|js)$ { root /app; try_files $uri =404; add_header X-Cache-Status STATIC; diff --git a/nginx/production b/nginx/production index 7cc0bad22..296ede70c 100644 --- a/nginx/production +++ b/nginx/production @@ -96,7 +96,7 @@ server { # # directly serve images and static files from the # # bookwyrm filesystem using sendfile. # # make the logs quieter by not reporting these requests -# location ~ \.(bmp|ico|jpg|jpeg|png|tif|tiff|ttf|webp|css|js)$ { +# location ~ \.(bmp|ico|jpg|jpeg|png|svg|tif|tiff|ttf|webp|css|js)$ { # root /app; # try_files $uri =404; # add_header X-Cache-Status STATIC; From 30ba8d37dc130ac547c59a5b7c2b7fae3d529214 Mon Sep 17 00:00:00 2001 From: Wesley Aptekar-Cassels Date: Tue, 23 Jan 2024 18:19:31 -0500 Subject: [PATCH 3/3] Add redis automatic rewrite configuration. This should hopefully prevent the AOF file from growing too large. --- redis.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/redis.conf b/redis.conf index 2a417579f..79d6804f5 100644 --- a/redis.conf +++ b/redis.conf @@ -2,6 +2,9 @@ bind 127.0.0.1 ::1 protected-mode yes port 6379 +auto-aof-rewrite-percentage 50 +auto-aof-rewrite-min-size 128mb + rename-command FLUSHDB "" rename-command FLUSHALL "" rename-command DEBUG ""