|
@ -5,19 +5,21 @@ |
|
|
|
|
|
|
|
|
set -e |
|
|
set -e |
|
|
|
|
|
|
|
|
if ! url=$(relation:get "${SERVICE_NAME}":odoo-server:web-proxy url); then |
|
|
|
|
|
err "Monujo doesn't support odoo-server not having a web-proxy yet." |
|
|
|
|
|
exit 1 |
|
|
|
|
|
fi |
|
|
|
|
|
if ! dbname=$(relation:get "${SERVICE_NAME}":odoo-server:postgres-database dbname); then |
|
|
|
|
|
err "Can't find db name of our odoo-server relation." |
|
|
|
|
|
exit 1 |
|
|
|
|
|
|
|
|
if service:traverse "${SERVICE_NAME}":odoo-server >/dev/null; then |
|
|
|
|
|
if ! url=$(relation:get "${SERVICE_NAME}":odoo-server:web-proxy url); then |
|
|
|
|
|
err "Monujo doesn't support odoo-server not having a web-proxy yet." |
|
|
|
|
|
exit 1 |
|
|
|
|
|
fi |
|
|
|
|
|
if ! dbname=$(relation:get "${SERVICE_NAME}":odoo-server:postgres-database dbname); then |
|
|
|
|
|
err "Can't find db name of our odoo-server relation." |
|
|
|
|
|
exit 1 |
|
|
|
|
|
fi |
|
|
|
|
|
monujo:config_merge "{ |
|
|
|
|
|
\"lokapiHost\": \"$url\", |
|
|
|
|
|
\"lokapiDb\": \"$dbname\" |
|
|
|
|
|
}" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
monujo:config_merge "{ |
|
|
|
|
|
\"lokapiHost\": \"$url\", |
|
|
|
|
|
\"lokapiDb\": \"$dbname\" |
|
|
|
|
|
}" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if map_url=$(relation:get "${SERVICE_NAME}":map-server:publish-dir url); then |
|
|
if map_url=$(relation:get "${SERVICE_NAME}":map-server:publish-dir url); then |
|
|