better error handling
This commit is contained in:
parent
9aa8a7540d
commit
c93f1422b1
@ -23,17 +23,16 @@ if [ "$1" = 'zammad-railsserver' ]; then
|
|||||||
# db mirgrate
|
# db mirgrate
|
||||||
set +e
|
set +e
|
||||||
bundle exec rake db:migrate &> /dev/null
|
bundle exec rake db:migrate &> /dev/null
|
||||||
|
DB_CHECK="$?"
|
||||||
if [ $? != 0 ]; then
|
|
||||||
echo "creating db & searchindex..."
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ "${DB_CHECK}" != "0" ]; then
|
||||||
|
echo "creating db & searchindex..."
|
||||||
bundle exec rake db:create
|
bundle exec rake db:create
|
||||||
bundle exec rake db:migrate
|
bundle exec rake db:migrate
|
||||||
bundle exec rake db:seed
|
bundle exec rake db:seed
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# es config
|
# es config
|
||||||
bundle exec rails r "Setting.set('es_url', 'http://zammad-elasticsearch:9200')"
|
bundle exec rails r "Setting.set('es_url', 'http://zammad-elasticsearch:9200')"
|
||||||
bundle exec rake searchindex:rebuild
|
bundle exec rake searchindex:rebuild
|
||||||
|
Loading…
Reference in New Issue
Block a user