|
@ -63,9 +63,16 @@ uses: |
|
|
- !bash-stdout | |
|
|
- !bash-stdout | |
|
|
workers=$(relation-base-compose-get workers 2>/dev/null) |
|
|
workers=$(relation-base-compose-get workers 2>/dev/null) |
|
|
workers=${workers:-1} |
|
|
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 |
|
|
if [ "$workers" -gt 1 ]; then |
|
|
|
|
|
if [ "${version%.*}" -lt 16 ]; then |
|
|
echo "ProxyPass /longpolling/ http://${MASTER_BASE_SERVICE_NAME}:8072/longpolling/" |
|
|
echo "ProxyPass /longpolling/ http://${MASTER_BASE_SERVICE_NAME}:8072/longpolling/" |
|
|
echo "ProxyPassReverse /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 |
|
|
fi |
|
|
backup: |
|
|
backup: |
|
|
constraint: recommended |
|
|
constraint: recommended |
|
|