From 3866262aa5a8a2f4378078038ef68cb55321c362 Mon Sep 17 00:00:00 2001 From: Marcel Herrguth Date: Wed, 23 Jun 2021 18:04:19 +0200 Subject: [PATCH] Maintenance: Provide performance tuning options for docker-compose (#217) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Maintenance: Provide performance tuning options for docker-compose * Maintenance: Ensure PUMA_OPTS being available anytime * Maintenance: Move PUMA_OPTS position * Maintenance: Adjust puma startup command to allow cluster workers * Maintenance: Solve SC2086 * Maintenance: Ensure puma knows it's config * Fix Typo to load config file * Maintenance: Tell puma what its correct config is... * fix bind Signed-off-by: André Bauer * change concurency to 0 by default Signed-off-by: André Bauer Co-authored-by: André Bauer --- containers/zammad/docker-entrypoint.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/containers/zammad/docker-entrypoint.sh b/containers/zammad/docker-entrypoint.sh index 2c0e850..b104d4a 100755 --- a/containers/zammad/docker-entrypoint.sh +++ b/containers/zammad/docker-entrypoint.sh @@ -27,6 +27,7 @@ set -e : "${ZAMMAD_RAILSSERVER_PORT:=3000}" : "${ZAMMAD_WEBSOCKET_HOST:=zammad-websocket}" : "${ZAMMAD_WEBSOCKET_PORT:=6042}" +: "${ZAMMAD_WEB_CONCURRENCY:=0}" function check_zammad_ready { sleep 15 @@ -142,10 +143,10 @@ if [ "$1" = 'zammad-railsserver' ]; then cd "${ZAMMAD_DIR}" - echo "starting railsserver..." + echo "starting railsserver... with WEB_CONCURRENCY=${ZAMMAD_WEB_CONCURRENCY}" #shellcheck disable=SC2101 - exec bundle exec rails server puma -b [::] -p "${ZAMMAD_RAILSSERVER_PORT}" -e "${RAILS_ENV}" + exec bundle exec puma -b tcp://[::]:"${ZAMMAD_RAILSSERVER_PORT}" -w "${ZAMMAD_WEB_CONCURRENCY}" -e "${RAILS_ENV}" fi