From 0b80e0d34b94f0f1e5b7f52a39db4d7e213b5bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Mon, 9 Apr 2018 18:07:40 +0200 Subject: [PATCH] added POSTGRESQL_DB env var --- containers/zammad/docker-entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/containers/zammad/docker-entrypoint.sh b/containers/zammad/docker-entrypoint.sh index d49926b..c11537f 100644 --- a/containers/zammad/docker-entrypoint.sh +++ b/containers/zammad/docker-entrypoint.sh @@ -7,6 +7,7 @@ set -e : "${POSTGRESQL_HOST:=zammad-postgresql}" : "${POSTGRESQL_USER:=postgres}" : "${POSTGRESQL_PASS:=}" +: "${POSTGRESQL_DB:=zammad_production}" : "${ZAMMAD_RAILSSERVER_HOST:=zammad-railsserver}" : "${ZAMMAD_WEBSOCKET_HOST:=zammad-websocket}" : "${NGINX_SERVER_NAME:=_}" @@ -34,7 +35,7 @@ if [ "$1" = 'zammad-init' ]; then cd ${ZAMMAD_DIR} # configure database & cache - sed -e "s#.*adapter:.*# adapter: postgresql#g" -e "s#.*username:.*# username: ${POSTGRESQL_USER}#g" -e "s#.*password:.*# password: ${POSTGRESQL_PASS}\n host: ${POSTGRESQL_HOST}\n#g" < config/database.yml.pkgr > config/database.yml + sed -e "s#.*adapter:.*# adapter: postgresql#g" -e "s#.*database:.*# database: ${POSTGRESQL_DB}#g" -e "s#.*username:.*# username: ${POSTGRESQL_USER}#g" -e "s#.*password:.*# password: ${POSTGRESQL_PASS}\n host: ${POSTGRESQL_HOST}\n#g" < config/database.yml.pkgr > config/database.yml sed -i -e "s/.*config.cache_store.*file_store.*cache_file_store.*/ config.cache_store = :dalli_store, '${MEMCACHED_HOST}:11211'\n config.session_store = :dalli_store, '${MEMCACHED_HOST}:11211'/" config/application.rb echo "initialising / updating database..."