mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-11-09 14:50:58 +00:00
feat: make client_max_body_size configurable via env (#1029)
This commit is contained in:
parent
75e44ba902
commit
8f7b234a12
@ -36,6 +36,7 @@ services:
|
|||||||
UPSTREAM_REAL_IP_HEADER: ${UPSTREAM_REAL_IP_HEADER:-X-Forwarded-For}
|
UPSTREAM_REAL_IP_HEADER: ${UPSTREAM_REAL_IP_HEADER:-X-Forwarded-For}
|
||||||
UPSTREAM_REAL_IP_RECURSIVE: ${UPSTREAM_REAL_IP_RECURSIVE:-off}
|
UPSTREAM_REAL_IP_RECURSIVE: ${UPSTREAM_REAL_IP_RECURSIVE:-off}
|
||||||
PROXY_READ_TIMOUT: ${PROXY_READ_TIMOUT:-120}
|
PROXY_READ_TIMOUT: ${PROXY_READ_TIMOUT:-120}
|
||||||
|
CLIENT_MAX_BODY_SIZE: ${CLIENT_MAX_BODY_SIZE:-50m}
|
||||||
volumes:
|
volumes:
|
||||||
- sites:/usr/share/nginx/html/sites
|
- sites:/usr/share/nginx/html/sites
|
||||||
- assets:/usr/share/nginx/html/assets
|
- assets:/usr/share/nginx/html/assets
|
||||||
|
@ -42,3 +42,7 @@ UPSTREAM_REAL_IP_RECURSIVE=
|
|||||||
# All Values Allowed by nginx proxy_read_timeout are allowed, default value is 120s
|
# All Values Allowed by nginx proxy_read_timeout are allowed, default value is 120s
|
||||||
# Useful if you have longrunning print formats or slow loading sites
|
# Useful if you have longrunning print formats or slow loading sites
|
||||||
PROXY_READ_TIMOUT=
|
PROXY_READ_TIMOUT=
|
||||||
|
|
||||||
|
# All Values allowed by nginx client_max_body_size are allowed, default value is 50m
|
||||||
|
# Necessary if the upload limit in the frappe application is increased
|
||||||
|
CLIENT_MAX_BODY_SIZE=
|
||||||
|
@ -44,6 +44,7 @@ FROM nginxinc/nginx-unprivileged:1.23.3-alpine as frappe
|
|||||||
|
|
||||||
# Set default ENV variables for backwards compatibility
|
# Set default ENV variables for backwards compatibility
|
||||||
ENV PROXY_READ_TIMOUT=120
|
ENV PROXY_READ_TIMOUT=120
|
||||||
|
ENV CLIENT_MAX_BODY_SIZE=50m
|
||||||
|
|
||||||
# https://github.com/nginxinc/docker-nginx-unprivileged/blob/main/stable/alpine/20-envsubst-on-templates.sh
|
# https://github.com/nginxinc/docker-nginx-unprivileged/blob/main/stable/alpine/20-envsubst-on-templates.sh
|
||||||
COPY nginx-template.conf /etc/nginx/templates/default.conf.template
|
COPY nginx-template.conf /etc/nginx/templates/default.conf.template
|
||||||
|
@ -87,7 +87,7 @@ server {
|
|||||||
# optimizations
|
# optimizations
|
||||||
sendfile on;
|
sendfile on;
|
||||||
keepalive_timeout 15;
|
keepalive_timeout 15;
|
||||||
client_max_body_size 50m;
|
client_max_body_size ${CLIENT_MAX_BODY_SIZE};
|
||||||
client_body_buffer_size 16K;
|
client_body_buffer_size 16K;
|
||||||
client_header_buffer_size 1k;
|
client_header_buffer_size 1k;
|
||||||
|
|
||||||
|
1
pwd.yml
1
pwd.yml
@ -88,6 +88,7 @@ services:
|
|||||||
UPSTREAM_REAL_IP_HEADER: X-Forwarded-For
|
UPSTREAM_REAL_IP_HEADER: X-Forwarded-For
|
||||||
UPSTREAM_REAL_IP_RECURSIVE: "off"
|
UPSTREAM_REAL_IP_RECURSIVE: "off"
|
||||||
PROXY_READ_TIMOUT: 120
|
PROXY_READ_TIMOUT: 120
|
||||||
|
CLIENT_MAX_BODY_SIZE: 50m
|
||||||
volumes:
|
volumes:
|
||||||
- sites:/usr/share/nginx/html/sites
|
- sites:/usr/share/nginx/html/sites
|
||||||
- assets:/usr/share/nginx/html/assets
|
- assets:/usr/share/nginx/html/assets
|
||||||
|
Loading…
Reference in New Issue
Block a user