Skip to content

Commit

Permalink
Add the ability to override the gunicorn path in start scripts
Browse files Browse the repository at this point in the history
No-Issue

Signed-off-by: Christian M. Adams <chadams@redhat.com>
  • Loading branch information
rooftopcellist committed Feb 22, 2024
1 parent 9b4e10c commit f48e8a4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docker/bin/start-api
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -o errexit
set -o nounset


readonly GUNICORN='/venv/bin/gunicorn'
readonly GUNICORN=${GUNICORN:-'/venv/bin/gunicorn'}
readonly GUNICORN_FORWARDED_ALLOW_IPS="${GUNICORN_FORWARDED_ALLOW_IPS:-}"
readonly GUNICORN_WORKERS="${GUNICORN_WORKERS:-4}"
readonly GUNICORN_LOGGER_CLASS="${GUNICORN_LOGGER_CLASS:-}"
Expand Down
2 changes: 1 addition & 1 deletion docker/bin/start-api-reload
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o errexit
set -o nounset


readonly GUNICORN='/venv/bin/gunicorn'
readonly GUNICORN=${GUNICORN:-'/venv/bin/gunicorn'}
readonly GUNICORN_WORKERS=${GUNICORN_WORKERS:-4}
readonly GUNICORN_LOGGER_CLASS="${GUNICORN_LOGGER_CLASS:-}"

Expand Down
6 changes: 3 additions & 3 deletions docker/bin/start-content-app
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
set -o errexit
set -o nounset


readonly GUNICORN=${GUNICORN:-'/venv/bin/gunicorn'}
readonly GUNICORN_WORKERS=${GUNICORN_WORKERS:-4}

readonly BIND_HOST='0.0.0.0'
readonly BIND_PORT="${GUNICORN_PORT:-24816}"
readonly WORKER_CLASS='aiohttp.GunicornWebWorker'
readonly APP_MODULE='pulpcore.content:server'

exec gunicorn \
exec "${GUNICORN}" \
--bind "${BIND_HOST}:${BIND_PORT}" \
--worker-class "${WORKER_CLASS}" \
--workers "${GUNICORN_WORKERS}" \
--access-logfile - \
"${APP_MODULE}"
"${APP_MODULE}"

0 comments on commit f48e8a4

Please sign in to comment.