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