From ff0851fac2609544a4443f4b5c26bd9b8eae52ef Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Sat, 15 Dec 2018 12:32:35 +0100 Subject: [PATCH] new: [odoo-tecnativa] will manage longpolling on apache relations Use ``options.workers`` to manage longpolling redirection. --- odoo-tecnativa/metadata.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/odoo-tecnativa/metadata.yml b/odoo-tecnativa/metadata.yml index 44765ac..e2acfd0 100644 --- a/odoo-tecnativa/metadata.yml +++ b/odoo-tecnativa/metadata.yml @@ -42,7 +42,15 @@ uses: auto: pair solves: proxy: "Public access" - #default-options: + default-options: + apache-custom-rules: + - !bash-stdout | + workers=$(relation-base-compose-get workers 2>/dev/null) + workers=${workers:-1} + if [ "$workers" -gt 1 ]; then + echo "ProxyPass /longpolling/ http://${MASTER_BASE_SERVICE_NAME}:8072/longpolling/" + echo "ProxyPassReverse /longpolling/ http://${MASTER_BASE_SERVICE_NAME}:8072/longpolling/" + fi # network-isolation: # whitelist: ## required external services used by this service