-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BAH-2581 | Add. Integrating Metabase with Open MRS Database
- Loading branch information
Showing
3 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
|
||
|
||
echo "Adding OPENMRS Database to Metabase" | ||
|
||
curl -s -X POST \ | ||
-H "Content-type: application/json" \ | ||
-H "X-Metabase-Session: ${MB_TOKEN}" \ | ||
http://${MB_HOST}:${MB_PORT}/api/database \ | ||
-d '{ | ||
"engine": "'${OPENMRS_DB_TYPE}'", | ||
"name": "'${OPENMRS_DB_HOST}'", | ||
"details": { | ||
"host": "'${OPENMRS_DB_HOST}'", | ||
"db": "'${OPENMRS_DB_NAME}'", | ||
"user": "'${OPENMRS_DB_USERNAME}'", | ||
"password": "'${OPENMRS_DB_PASSWORD}'" | ||
} | ||
}' | ||
|
||
echo "OPENMRS Database added to Metabase" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters