From b7205461abd94ae047368387479b81c28b88526d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Thu, 5 Jan 2017 14:17:52 +0100 Subject: [PATCH] changed git clone command & added rails env to puma and unicorn cmds --- docker-entrypoint.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index e8d7d39..df5c818 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -31,10 +31,9 @@ if [ "$1" = 'zammad' ]; then else echo "installing zammad..." cd /tmp - git clone ${GIT_URL} + git clone --depth 1 -b ${GIT_BRANCH} ${GIT_URL} mv -f /tmp/zammad/* ${ZAMMAD_DIR}/ cd ${ZAMMAD_DIR} - git checkout ${GIT_BRANCH} bundle install --without test development sed -e 's#.*username:.*# username: postgres#g' -e 's#.*password:.*# password: \n host: postgresql\n#g' < config/database.yml.pkgr > config/database.yml rake db:drop @@ -57,9 +56,9 @@ if [ "$1" = 'zammad' ]; then bundle exec script/scheduler.rb start & if [ "${RAILS_SERVER}" == "puma" ]; then - bundle exec puma -b tcp://0.0.0.0:3000 + bundle exec puma -b tcp://0.0.0.0:3000 -e ${RAILS_ENV} elif [ "${RAILS_SERVER}" == "unicorn" ]; then - bundle exec unicorn -p 3000 -c config/unicorn.rb + bundle exec unicorn -p 3000 -c config/unicorn.rb -E ${RAILS_ENV} fi if [ "${DEBUG}" == "yes" ]; then