-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes, better db checks andtolerance
- Loading branch information
Chris Roeder CUAnschutz
committed
Jan 24, 2023
1 parent
08933f8
commit 78ce182
Showing
3 changed files
with
19 additions
and
7 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
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 |
---|---|---|
@@ -1,13 +1,20 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
set -uo pipefail | ||
|
||
env | grep PG_ | ||
env | grep PG | ||
if (( $? )) ; then | ||
echo "ERROR:missing PG_* environment variables used in the applicaiton.yaml" | ||
echo "These are distinct from the PG variables postgres uses that do not have underscores." | ||
echo "ERROR:missing PG* environment variables used in the application.yaml" | ||
exit 1 | ||
fi | ||
|
||
psql -lqt | awk '{ print $1 }' | grep $PGDATABASE | ||
if (( $? )) ; then | ||
echo "INFO: databse \"$PGDATABASE\" does not exist, creating." | ||
createdb $PGDATABASE | ||
else | ||
echo "INFO: found databse \"$PGDATABASE\"." | ||
fi | ||
|
||
# RUN | ||
exec java -Xmx10G -jar "${TIMS_DIR}/hapi/ROOT.war" --spring.config.location="${TIMS_DIR}/hapi/" >> ${TIMS_DIR}/hapi.log & | ||
|