mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Merge dockerize commands
This commit is contained in:
parent
6dea37ec41
commit
93d5e360ca
1 changed files with 6 additions and 3 deletions
|
|
@ -31,13 +31,16 @@ user=$MYSQL_USER
|
|||
password=$MYSQL_PASSWORD
|
||||
ABC
|
||||
|
||||
if [ $(echo "show tables;" | dockerize -wait tcp://$DATABASE_HOST:$DATABASE_PORT -timeout 60s mysql --host $DATABASE_HOST --port $DATABASE_PORT $MYSQL_DATABASE | wc -l) -le 1 ]; then
|
||||
echo ">>> Waiting for database to get ready to connect..."
|
||||
dockerize -wait tcp://$DATABASE_HOST:$DATABASE_PORT -timeout 60s true
|
||||
|
||||
if [ $(echo "show tables;" | mysql --host $DATABASE_HOST --port $DATABASE_PORT $MYSQL_DATABASE | wc -l) -le 1 ]; then
|
||||
echo ">>> Initializing database..."
|
||||
dockerize -wait tcp://$DATABASE_HOST:$DATABASE_PORT -timeout 60s bundle exec rake db:schema:load
|
||||
bundle exec rake db:schema:load
|
||||
fi
|
||||
|
||||
echo ">>> Upgrading database..."
|
||||
dockerize -wait tcp://$DATABASE_HOST:$DATABASE_PORT -timeout 60s bundle exec rake db:migrate
|
||||
bundle exec rake db:migrate
|
||||
|
||||
rm .my.cnf
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue