Add MAX_UPLOAD_SIZE env setting support to all-in-one docker container (#2051)

This commit is contained in:
Leendert de Borst
2026-05-20 20:07:31 +02:00
committed by Leendert de Borst
parent 9772f83b81
commit f5847cbc25
3 changed files with 7 additions and 2 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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