upstream ${ODOO_SERVICE}server {
 	server ${ODOO_SERVICE}:8069 fail_timeout=300s;
}

upstream ${ODOO_SERVICE}longpoll {
	server ${ODOO_SERVICE}:8072 fail_timeout=300s;
}

server {
 	listen ${PORT};
 	server_name ${ODOO_SERVER_NAMES};
        client_max_body_size 200M;
        proxy_read_timeout 720s;
        proxy_connect_timeout 720s;
        proxy_send_timeout 720s;
        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;
        proxy_set_header X-Forwarded-Proto ${DOLLSIGN}scheme;
        proxy_set_header X-Real-IP ${DOLLSIGN}remote_addr;
        location / {
                proxy_pass http://${ODOO_SERVICE}server;
                proxy_redirect off;
	}
	location /longpolling {
		proxy_pass http://${ODOO_SERVICE}longpoll;
	}
}
