Update docker-entrypoint.sh

This commit is contained in:
André Bauer 2018-04-10 11:17:23 +02:00 committed by GitHub
parent 0b80e0d34b
commit 0e7c68b741
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,7 @@ set -e
: "${POSTGRESQL_USER:=postgres}" : "${POSTGRESQL_USER:=postgres}"
: "${POSTGRESQL_PASS:=}" : "${POSTGRESQL_PASS:=}"
: "${POSTGRESQL_DB:=zammad_production}" : "${POSTGRESQL_DB:=zammad_production}"
: "${POSTGRESQL_DB_CREATE:=true}"
: "${ZAMMAD_RAILSSERVER_HOST:=zammad-railsserver}" : "${ZAMMAD_RAILSSERVER_HOST:=zammad-railsserver}"
: "${ZAMMAD_WEBSOCKET_HOST:=zammad-websocket}" : "${ZAMMAD_WEBSOCKET_HOST:=zammad-websocket}"
: "${NGINX_SERVER_NAME:=_}" : "${NGINX_SERVER_NAME:=_}"
@ -46,7 +47,9 @@ if [ "$1" = 'zammad-init' ]; then
set -e set -e
if [ "${DB_CHECK}" != "0" ]; then if [ "${DB_CHECK}" != "0" ]; then
if [ "{POSTGRESQL_DB_CREATE}" == "true" ]; then
bundle exec rake db:create bundle exec rake db:create
fi
bundle exec rake db:migrate bundle exec rake db:migrate
bundle exec rake db:seed bundle exec rake db:seed
fi fi