Update docker-entrypoint.sh

This commit is contained in:
André Bauer 2017-05-12 13:20:14 +02:00 committed by GitHub
parent 9cedf45c3c
commit d5856c7ef5

View File

@ -12,13 +12,13 @@ if [ "$1" = 'zammad-railsserver' ]; then
cd ${ZAMMAD_DIR} cd ${ZAMMAD_DIR}
bundle exec rake db:migrate &> /dev/null bundle exec rake db:migrate &> /dev/null
bundle exec rails r "Setting.set('es_url', 'http://zammad-elasticsearch:9200')"
if [ $? != 0 ]; then if [ $? != 0 ]; then
echo "creating db & searchindex..." 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
bundle exec rails r "Setting.set('es_url', 'http://zammad-elasticsearch:9200')"
bundle exec rake searchindex:rebuild bundle exec rake searchindex:rebuild
fi fi