-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from Bahmni/BAH-3453
BAH-3453|Deepthi m/Keerthana Y |Added init script for snomed standard with snowstrom lite and updated Readme.
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 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,16 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
create_user_and_database() { | ||
export PG_PASSWORD=${POSTGRES_PASSWORD} | ||
DB_NAME="$1" | ||
DB_USERNAME="$2" | ||
DB_PASSWORD="$3" | ||
psql -c "CREATE DATABASE ${DB_NAME};" | ||
psql -c "REVOKE ALL ON DATABASE ${DB_NAME} FROM PUBLIC;" | ||
psql -c "CREATE USER ${DB_USERNAME} WITH ENCRYPTED PASSWORD '${DB_PASSWORD}';" | ||
psql -c "GRANT ALL ON DATABASE ${DB_NAME} TO ${DB_USERNAME};" | ||
} | ||
|
||
create_user_and_database "${DCM4CHEE_DB_NAME}" "${DCM4CHEE_DB_USERNAME}" "${DCM4CHEE_DB_PASSWORD}" | ||
create_user_and_database "${PACS_INTEGRATION_DB_NAME}" "${PACS_INTEGRATION_DB_USERNAME}" "${PACS_INTEGRATION_DB_PASSWORD}" |