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