mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-05-24 16:32:20 -04:00
Add MAX_UPLOAD_SIZE env setting support to all-in-one docker container (#2051)
This commit is contained in:
committed by
Leendert de Borst
parent
9772f83b81
commit
f5847cbc25
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user