From c7c8bd080369463923fe013dd307af3b2fb401ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Sat, 7 Jan 2017 17:03:38 +0100 Subject: [PATCH] added locale download to zammad image --- docker-entrypoint.sh | 16 ++++++++-------- install-zammad.sh | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 99d09ef..5412a18 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -6,17 +6,17 @@ if [ "$1" = 'zammad' ]; then rake db:migrate &> /dev/null if [ $? != 0 ]; then - echo "creating db, assets, searchindex..." - rake db:create - rake db:migrate - rake db:seed - rails r "Setting.set('es_url', 'http://elasticsearch:9200')" - rake searchindex:rebuild + echo "creating db & searchindex..." + bundle exec rake db:create + bundle exec rake db:migrate + bundle exec rake db:seed + bundle exec rails r "Setting.set('es_url', 'http://elasticsearch:9200')" + bundle exec rake searchindex:rebuild fi # delete logs & pids - rm ${ZAMMAD_DIR}/log/* - rm ${ZAMMAD_DIR}/tmp/pids/* + rm ${ZAMMAD_DIR}/log/*.log + rm ${ZAMMAD_DIR}/tmp/pids/*.pid # run zammad echo "starting zammad..." diff --git a/install-zammad.sh b/install-zammad.sh index bc8de1a..c6f391c 100644 --- a/install-zammad.sh +++ b/install-zammad.sh @@ -9,6 +9,7 @@ cp -R /tmp/zammad/.[!.]* ${ZAMMAD_DIR} cd ${ZAMMAD_DIR} rm -rf /tmp/zammad bundle install --without test development mysql +contrib/packager.io/fetch_locales.rb sed -e 's#.*adapter: postgresql# adapter: nulldb#g' -e 's#.*username:.*# username: postgres#g' -e 's#.*password:.*# password: \n host: postgresql\n#g' < config/database.yml.pkgr > config/database.yml bundle exec rake assets:precompile sed -e 's#.*adapter: postgresql# adapter: postgresql#g' -e 's#.*username:.*# username: postgres#g' -e 's#.*password:.*# password: \n host: postgresql\n#g' < config/database.yml.pkgr > config/database.yml