|
|
@ -63,9 +63,16 @@ uses: |
|
|
|
- !bash-stdout | |
|
|
|
workers=$(relation-base-compose-get workers 2>/dev/null) |
|
|
|
workers=${workers:-1} |
|
|
|
version=$(cached_cmd_on_base_image "$MASTER_BASE_SERVICE_NAME" \ |
|
|
|
"python -c 'import odoo; print(odoo.cli.server.__version__)'") || exit 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/" |
|
|
|
if [ "${version%.*}" -lt 16 ]; then |
|
|
|
echo "ProxyPass /longpolling/ http://${MASTER_BASE_SERVICE_NAME}:8072/longpolling/" |
|
|
|
echo "ProxyPassReverse /longpolling/ http://${MASTER_BASE_SERVICE_NAME}:8072/longpolling/" |
|
|
|
else |
|
|
|
echo "ProxyPass /websocket ws://${MASTER_BASE_SERVICE_NAME}:8072/websocket" |
|
|
|
echo "ProxyPassReverse /websocket ws://${MASTER_BASE_SERVICE_NAME}:8072/websocket" |
|
|
|
fi |
|
|
|
fi |
|
|
|
backup: |
|
|
|
constraint: recommended |
|
|
|