diff --git a/apps/swh-search/entrypoint.sh b/apps/swh-search/entrypoint.sh index db2c4a1d437c22e6b383362f7307ce43332c47f2..6322315c046a3383e1c8c9b96ec21be885e459b6 100644 --- a/apps/swh-search/entrypoint.sh +++ b/apps/swh-search/entrypoint.sh @@ -17,9 +17,14 @@ case "$1" in exec swh $@ ;; *) + EXTRA_CLI_FLAGS="" + if [ ! -z "${SWH_LOG_CONFIG_JSON}" ]; then + EXTRA_CLI_FLAGS="--log-config-json ${SWH_LOG_CONFIG_JSON}" + fi echo Starting the swh-search API server exec gunicorn --bind 0.0.0.0:${PORT} \ --log-level ${SWH_LOG_LEVEL:-INFO} \ + ${EXTRA_CLI_FLAGS} \ --threads ${THREADS} \ --workers ${WORKERS} \ --timeout ${TIMEOUT} \ diff --git a/apps/swh-search/requirements.txt b/apps/swh-search/requirements.txt index b66204c5c18a564ec5a6b45bf660631a51693989..95589712712a659507b568cd9b6bbded5fd5054f 100644 --- a/apps/swh-search/requirements.txt +++ b/apps/swh-search/requirements.txt @@ -1 +1,2 @@ swh.search +python-json-logger