From f5847cbc25230d95e4975734ef26508d92a90b59 Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Wed, 20 May 2026 20:07:31 +0200 Subject: [PATCH] Add MAX_UPLOAD_SIZE env setting support to all-in-one docker container (#2051) --- dockerfiles/all-in-one/config/nginx-443.conf | 3 ++- dockerfiles/all-in-one/config/nginx-80-443.conf | 3 ++- dockerfiles/all-in-one/s6-scripts/nginx/run | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dockerfiles/all-in-one/config/nginx-443.conf b/dockerfiles/all-in-one/config/nginx-443.conf index bb5ebee06..3a11ce6dc 100644 --- a/dockerfiles/all-in-one/config/nginx-443.conf +++ b/dockerfiles/all-in-one/config/nginx-443.conf @@ -5,7 +5,8 @@ events { } http { - client_max_body_size 25M; + # Placeholder replaced at container startup by s6-scripts/nginx/run based on MAX_UPLOAD_SIZE_MB (default 100). + client_max_body_size __MAX_UPLOAD_SIZE__M; upstream client { server 127.0.0.1:3000 max_fails=1 fail_timeout=5s; diff --git a/dockerfiles/all-in-one/config/nginx-80-443.conf b/dockerfiles/all-in-one/config/nginx-80-443.conf index ff709623c..576d43109 100644 --- a/dockerfiles/all-in-one/config/nginx-80-443.conf +++ b/dockerfiles/all-in-one/config/nginx-80-443.conf @@ -6,7 +6,8 @@ events { } http { - client_max_body_size 25M; + # Placeholder replaced at container startup by s6-scripts/nginx/run based on MAX_UPLOAD_SIZE_MB (default 100). + client_max_body_size __MAX_UPLOAD_SIZE__M; upstream client { server 127.0.0.1:3000 max_fails=1 fail_timeout=5s; diff --git a/dockerfiles/all-in-one/s6-scripts/nginx/run b/dockerfiles/all-in-one/s6-scripts/nginx/run index 514d84a15..9cf396171 100644 --- a/dockerfiles/all-in-one/s6-scripts/nginx/run +++ b/dockerfiles/all-in-one/s6-scripts/nginx/run @@ -80,6 +80,9 @@ build_admin_ip_geo_rules() { esac } +MAX_UPLOAD_SIZE_MB_VALUE="${MAX_UPLOAD_SIZE_MB:-100}" +sed -i "s|__MAX_UPLOAD_SIZE__|${MAX_UPLOAD_SIZE_MB_VALUE}|g" /etc/nginx/nginx.conf + ADMIN_IP_GEO_RULES_VALUE=$(build_admin_ip_geo_rules) sed -i "s|__ADMIN_IP_GEO_RULES__|${ADMIN_IP_GEO_RULES_VALUE}|g" /etc/nginx/nginx.conf