diff --git a/odoo-tecnativa/hooks/postgres_database-relation-joined b/odoo-tecnativa/hooks/postgres_database-relation-joined index 3533ec9f..ce5331ad 100755 --- a/odoo-tecnativa/hooks/postgres_database-relation-joined +++ b/odoo-tecnativa/hooks/postgres_database-relation-joined @@ -22,23 +22,24 @@ ADMIN_PASSWORD=$(relation-base-compose-get admin-password 2>/dev/null) || { fi } - - control=$(echo -en "$USER\0$DBNAME\0$PASSWORD\0$ADMIN_PASSWORD" | md5_compat) +database=$(options-get database 2>/dev/null) || true +database="${database:-$DBNAME}" + config-add "\ services: $MASTER_BASE_SERVICE_NAME: command: - - '--database=$DBNAME' - ## All this is to please technativa image, but is quite redundant + - '--database=$database' + ## All this is to please tecnativa image, but is quite redundant environment: - PGHOST: $MASTER_TARGET_SERVICE_NAME - PGDATABASE: $DBNAME - PGPASSWORD: $PASSWORD - PGUSER: $USER + PGHOST: \"$MASTER_TARGET_SERVICE_NAME\" + PGDATABASE: \"$DBNAME\" + PGPASSWORD: \"$PASSWORD\" + PGUSER: \"$USER\" #DBFILTER: $DBNAME - ADMIN_PASSWORD: $ADMIN_PASSWORD + ADMIN_PASSWORD: \"$ADMIN_PASSWORD\" " [ "$control" == "$(relation-get control 2>/dev/null)" ] && exit 0