Skip to content

Commit

Permalink
Adding DB create support
Browse files Browse the repository at this point in the history
  • Loading branch information
ssalevan committed Jan 19, 2017
1 parent 90950b5 commit 9e9944c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dockerrun
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

retcode=-1
while (($retcode != 0)); do
mysql -u$"${QLINK_DB_USERNAME}" -h"${QLINK_DB_HOST}" -P3306 -Dqlink --password="${QLINK_DB_PASSWORD}" < ./schema.sql
if [ "${QLINK_SHOULD_CREATE_DB}" == "true" ]; then
mysql -u"${QLINK_DB_USERNAME}" -h"${QLINK_DB_HOST}" -P3306 --password="${QLINK_DB_PASSWORD}" < ./dev_privileges.sql
fi
mysql -u"${QLINK_DB_USERNAME}" -h"${QLINK_DB_HOST}" -P3306 -Dqlink --password="${QLINK_DB_PASSWORD}" < ./schema.sql
retcode=${?}
sleep 1
done
Expand Down

0 comments on commit 9e9944c

Please sign in to comment.