From 131f9c29d4c04472ef196ac2fdddd0579674988e Mon Sep 17 00:00:00 2001 From: "Christian M. Adams" Date: Mon, 25 Mar 2024 11:34:40 -0400 Subject: [PATCH] Use new entrypoint cmd per guidance from Pulp team No-Issue Signed-off-by: Christian M. Adams --- docker/bin/start-api | 6 ++---- docker/bin/start-api-reload | 5 ++--- docker/bin/start-content-app | 10 +++------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/docker/bin/start-api b/docker/bin/start-api index 4922186eb7..ab4ced8549 100755 --- a/docker/bin/start-api +++ b/docker/bin/start-api @@ -4,7 +4,7 @@ set -o errexit set -o nounset -readonly GUNICORN=${GUNICORN:-'/venv/bin/gunicorn'} +readonly ENTRYPOINT=${ENTRYPOINT:-'/venv/bin/pulpcore-api'} readonly GUNICORN_FORWARDED_ALLOW_IPS="${GUNICORN_FORWARDED_ALLOW_IPS:-}" readonly GUNICORN_WORKERS="${GUNICORN_WORKERS:-4}" readonly GUNICORN_LOGGER_CLASS="${GUNICORN_LOGGER_CLASS:-}" @@ -12,14 +12,12 @@ readonly GUNICORN_TIMEOUT="${GUNICORN_TIMEOUT:-60}" readonly BIND_HOST='0.0.0.0' readonly BIND_PORT=${GUNICORN_PORT:-8000} -readonly APP_MODULE='pulpcore.app.wsgi:application' GUNICORN_OPTIONS=( --bind "${BIND_HOST}:${BIND_PORT}" --workers "${GUNICORN_WORKERS}" --access-logfile - - --limit-request-field_size 32768 --timeout "${GUNICORN_TIMEOUT}" ) @@ -31,4 +29,4 @@ if [[ -n "${GUNICORN_LOGGER_CLASS}" ]]; then GUNICORN_OPTIONS+=(--logger-class "${GUNICORN_LOGGER_CLASS}") fi -exec "${GUNICORN}" "${GUNICORN_OPTIONS[@]}" "${APP_MODULE}" \ No newline at end of file +exec "${ENTRYPOINT}" "${GUNICORN_OPTIONS[@]}" diff --git a/docker/bin/start-api-reload b/docker/bin/start-api-reload index 124593a461..489d92f32e 100755 --- a/docker/bin/start-api-reload +++ b/docker/bin/start-api-reload @@ -5,13 +5,12 @@ set -o errexit set -o nounset -readonly GUNICORN=${GUNICORN:-'/venv/bin/gunicorn'} +readonly ENTRYPOINT=${ENTRYPOINT:-'/venv/bin/pulpcore-api'} readonly GUNICORN_WORKERS=${GUNICORN_WORKERS:-4} readonly GUNICORN_LOGGER_CLASS="${GUNICORN_LOGGER_CLASS:-}" readonly BIND_HOST='0.0.0.0' readonly BIND_PORT=8000 -readonly APP_MODULE='pulpcore.app.wsgi:application' GUNICORN_OPTIONS=( --bind "${BIND_HOST}:${BIND_PORT}" @@ -27,4 +26,4 @@ if [[ -n "${GUNICORN_LOGGER_CLASS}" ]]; then GUNICORN_OPTIONS+=(--logger-class "${GUNICORN_LOGGER_CLASS}") fi -exec "${GUNICORN}" "${GUNICORN_OPTIONS[@]}" "${APP_MODULE}" +exec "${ENTRYPOINT}" "${GUNICORN_OPTIONS[@]}" diff --git a/docker/bin/start-content-app b/docker/bin/start-content-app index 26bae54a2b..756d764188 100755 --- a/docker/bin/start-content-app +++ b/docker/bin/start-content-app @@ -3,17 +3,13 @@ set -o errexit set -o nounset -readonly GUNICORN=${GUNICORN:-'/venv/bin/gunicorn'} +readonly ENTRYPOINT=${ENTRYPOINT:-'/venv/bin/pulpcore-content'} 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 "${ENTRYPOINT}" \ --bind "${BIND_HOST}:${BIND_PORT}" \ - --worker-class "${WORKER_CLASS}" \ --workers "${GUNICORN_WORKERS}" \ - --access-logfile - \ - "${APP_MODULE}" + --access-logfile -