[IMP]Odoo Nginx : make proxy timeouts configurable

This commit is contained in:
Fabien BOURGEOIS 2019-04-24 04:49:55 +02:00
parent 871df0cbf0
commit 29209454cb
3 changed files with 11 additions and 7 deletions

View File

@ -15,7 +15,10 @@ for tpl in * ; do
do
SERVICE=${ODOO_SERVICE[$index]}
SERVER_NAMES=${ODOO_SERVER_NAMES[$index]}
export SERVICE SERVER_NAMES
PROXY_READ_TIMEOUT=${PROXY_READ_TIMEOUT:=720s}
PROXY_CONNECT_TIMEOUT=${PROXY_CONNECT_TIMEOUT:=720s}
PROXY_SEND_TIMEOUT=${PROXY_SEND_TIMEOUT:=720s}
export SERVICE SERVER_NAMES PROXY_READ_TIMEOUT PROXY_CONNECT_TIMEOUT PROXY_SEND_TIMEOUT
envsubst < $tpl >> /etc/nginx/conf.d/$tpl
((index++))
done

View File

@ -22,9 +22,9 @@ server {
gzip_types text/plain text/xml text/css text/less application/x-javascript application/xml application/json application/javascript;
gzip_vary on;
keepalive_timeout 120s;
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
proxy_read_timeout ${PROXY_READ_TIMEOUT};
proxy_connect_timeout ${PROXY_CONNECT_TIMEOUT};
proxy_send_timeout ${PROXY_SEND_TIMEOUT};
proxy_buffer_size 64k;
proxy_buffering off;
proxy_buffers 4 64k;

View File

@ -10,9 +10,10 @@ server {
listen ${PORT};
server_name ${SERVER_NAMES};
client_max_body_size 200M;
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
keepalive_timeout 120s;
proxy_read_timeout ${PROXY_READ_TIMEOUT};
proxy_connect_timeout ${PROXY_CONNECT_TIMEOUT};
proxy_send_timeout ${PROXY_SEND_TIMEOUT};
proxy_set_header Host ${DOLLSIGN}http_host;
proxy_set_header X-Forwarded-Host ${DOLLSIGN}http_host;
proxy_set_header X-Forwarded-For ${DOLLSIGN}proxy_add_x_forwarded_for;