[FIX]Add proxy_mode option and fix nginx configuration
This commit is contained in:
parent
5fc7bf20c3
commit
d0f06e0252
@ -11,7 +11,6 @@ services:
|
||||
NGINX_HOST: localhost 127.0.0.1
|
||||
ODOO_SERVICE: odoo
|
||||
ODOO_SERVER_NAMES: localodoo odoo ocb
|
||||
command: /bin/true
|
||||
|
||||
odoodev:
|
||||
extends:
|
||||
@ -28,6 +27,8 @@ services:
|
||||
WORKERS: 2
|
||||
LIMIT_TIME_CPU: 3000
|
||||
LIMIT_TIME_REAL: 6000
|
||||
DEV: 1
|
||||
PROXY_MODE: "False"
|
||||
volumes:
|
||||
- /home/fabien/tmp/programming/py/server-tools:/opt/odoo/custom-addons/server-tools:ro
|
||||
|
||||
|
@ -20,18 +20,20 @@ server {
|
||||
proxy_pass http://odooserver;
|
||||
proxy_http_version 1.1;
|
||||
proxy_read_timeout 300;
|
||||
proxy_set_header Host ${DOLLSIGN}host;
|
||||
proxy_set_header Host ${DOLLSIGN}http_host;
|
||||
proxy_set_header X-Real-IP ${DOLLSIGN}remote_addr;
|
||||
proxy_set_header X-Forward-For ${DOLLSIGN}proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header X-Forwarded-Host ${DOLLSIGN}http_host;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /longpolling {
|
||||
proxy_pass http://odoolongpoll;
|
||||
proxy_set_header Host ${DOLLSIGN}host;
|
||||
proxy_set_header Host ${DOLLSIGN}http_host;
|
||||
proxy_set_header X-Real-IP ${DOLLSIGN}remote_addr;
|
||||
proxy_set_header X-Forward-For ${DOLLSIGN}proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header X-Forwarded-Host ${DOLLSIGN}http_host;
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
||||
|
@ -7,23 +7,25 @@ upstream odoolongpoll {
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen ${PORT};
|
||||
server_name ${ODOO_SERVER_NAMES};
|
||||
client_max_body_size 200M;
|
||||
location / {
|
||||
proxy_pass http://odooserver;
|
||||
proxy_http_version 1.1;
|
||||
proxy_read_timeout 300;
|
||||
proxy_set_header Host ${DOLLSIGN}host;
|
||||
proxy_set_header Host ${DOLLSIGN}http_host;
|
||||
proxy_set_header X-Real-IP ${DOLLSIGN}remote_addr;
|
||||
proxy_set_header X-Forward-For ${DOLLSIGN}proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host ${DOLLSIGN}http_host;
|
||||
proxy_redirect http://$http_host/ https://$host:$server_port/;
|
||||
}
|
||||
location /longpolling {
|
||||
proxy_pass http://odoolongpoll;
|
||||
proxy_set_header Host ${DOLLSIGN}host;
|
||||
proxy_set_header Host ${DOLLSIGN}http_host;
|
||||
proxy_set_header X-Real-IP ${DOLLSIGN}remote_addr;
|
||||
proxy_set_header X-Forward-For ${DOLLSIGN}proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host ${DOLLSIGN}http_host;
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ db_maxconn = ${DB_MAXCONN:=10}
|
||||
list_db = ${LIST_DB:=True}
|
||||
xmlrpc_port = ${XMLRPC_PORT:=8069}
|
||||
longpolling_port = ${LONGPOLLING_PORT:=8072}
|
||||
proxy_mode = ${PROXY_MODE:=False}
|
||||
workers = ${WORKERS:=1}
|
||||
limit_time_cpu = ${LIMIT_TIME_CPU:=60}
|
||||
limit_time_real = ${LIMIT_TIME_REAL:=120}
|
||||
|
@ -19,3 +19,5 @@ services:
|
||||
context: ./odoo
|
||||
environment:
|
||||
LIST_DB: "False"
|
||||
DEV: 0
|
||||
PROXY_MODE: "True"
|
||||
|
Loading…
Reference in New Issue
Block a user