[IMP][FIX]Better multiprocess and longpolling handling for dev dev, on demand
This commit is contained in:
parent
99bf94df7b
commit
5fc7bf20c3
@ -23,6 +23,8 @@ services:
|
|||||||
image: odoo:yaltik8
|
image: odoo:yaltik8
|
||||||
environment:
|
environment:
|
||||||
DB_MAXCONN: 20
|
DB_MAXCONN: 20
|
||||||
|
XMLRPC_PORT: 8069
|
||||||
|
LONGPOLLING_PORT: 8072
|
||||||
WORKERS: 2
|
WORKERS: 2
|
||||||
LIMIT_TIME_CPU: 720
|
LIMIT_TIME_CPU: 720
|
||||||
LIMIT_TIME_REAL: 1440
|
LIMIT_TIME_REAL: 1440
|
||||||
|
12
odoo/dev.yml
12
odoo/dev.yml
@ -1,6 +1,18 @@
|
|||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
build:
|
||||||
|
context: ./nginx
|
||||||
|
dockerfile: Dockerfile.dev
|
||||||
|
image: nginx:odoodev
|
||||||
|
environment:
|
||||||
|
PORT: 80
|
||||||
|
NGINX_HOST: localhost 127.0.0.1
|
||||||
|
ODOO_SERVICE: odoo
|
||||||
|
ODOO_SERVER_NAMES: localodoo odoo ocb
|
||||||
|
command: /bin/true
|
||||||
|
|
||||||
odoodev:
|
odoodev:
|
||||||
extends:
|
extends:
|
||||||
file: base.yml
|
file: base.yml
|
||||||
|
8
odoo/nginx/Dockerfile.dev
Normal file
8
odoo/nginx/Dockerfile.dev
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
FROM nginx:yaltik
|
||||||
|
MAINTAINER Yaltik - Fabien Bourgeois <fabien@yaltik.com>
|
||||||
|
|
||||||
|
# Default variables
|
||||||
|
ENV ODOO_SERVER_NAMES odoo
|
||||||
|
|
||||||
|
# Copy templates and usefull files
|
||||||
|
COPY odoo.conf.dev /etc/nginx/templates/odoo.conf
|
29
odoo/nginx/odoo.conf.dev
Normal file
29
odoo/nginx/odoo.conf.dev
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
upstream odooserver {
|
||||||
|
server ${ODOO_SERVICE}:8069 fail_timeout=300s;
|
||||||
|
}
|
||||||
|
|
||||||
|
upstream odoolongpoll {
|
||||||
|
server ${ODOO_SERVICE}:8072 fail_timeout=300s;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
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 X-Real-IP ${DOLLSIGN}remote_addr;
|
||||||
|
proxy_set_header X-Forward-For ${DOLLSIGN}proxy_add_x_forwarded_for;
|
||||||
|
proxy_redirect http://$http_host/ https://$host:$server_port/;
|
||||||
|
}
|
||||||
|
location /longpolling {
|
||||||
|
proxy_pass http://odoolongpoll;
|
||||||
|
proxy_set_header Host ${DOLLSIGN}host;
|
||||||
|
proxy_set_header X-Real-IP ${DOLLSIGN}remote_addr;
|
||||||
|
proxy_set_header X-Forward-For ${DOLLSIGN}proxy_add_x_forwarded_for;
|
||||||
|
proxy_redirect off;
|
||||||
|
}
|
||||||
|
}
|
@ -32,6 +32,8 @@ db_user = $POSTGRES_USER
|
|||||||
db_password = $POSTGRES_PASSWORD
|
db_password = $POSTGRES_PASSWORD
|
||||||
db_maxconn = ${DB_MAXCONN:=10}
|
db_maxconn = ${DB_MAXCONN:=10}
|
||||||
list_db = ${LIST_DB:=True}
|
list_db = ${LIST_DB:=True}
|
||||||
|
xmlrpc_port = ${XMLRPC_PORT:=8069}
|
||||||
|
longpolling_port = ${LONGPOLLING_PORT:=8072}
|
||||||
workers = ${WORKERS:=1}
|
workers = ${WORKERS:=1}
|
||||||
limit_time_cpu = ${LIMIT_TIME_CPU:=60}
|
limit_time_cpu = ${LIMIT_TIME_CPU:=60}
|
||||||
limit_time_real = ${LIMIT_TIME_REAL:=120}
|
limit_time_real = ${LIMIT_TIME_REAL:=120}
|
||||||
|
Loading…
Reference in New Issue
Block a user