From 0a278f89de8d78c035d5fc3024fdd68ec01e4971 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 --- docker/bin/start-api | 5 ++--- docker/bin/start-api-reload | 5 ++--- docker/bin/start-content-app | 10 +++------- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/docker/bin/start-api b/docker/bin/start-api index 4922186eb7..bd39df0425 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:-'/usr/local/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,7 +12,6 @@ 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=( @@ -31,4 +30,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..2a90adc920 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:-'/usr/local/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..d84be79d3f 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:-'/usr/local/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