promenade/entrypoint.sh
Crank, Daniel (dc6350) d8c87f3f7b Log client-id in UCP API endpoints
Adds functionality to read context marker and end-user
from request headers and log that information where
available, to aid in tracing transactions that span
multiple Airship components.

Change-Id: I31c26b269ef6db9ebf44eb381eb6745ce40fc4ea
2019-04-05 09:55:15 +00:00

32 lines
792 B
Bash
Executable File

#!/bin/bash
set -ex
PORT=${PORT:-9000}
UWSGI_TIMEOUT=${UWSGI_TIMEOUT:-300}
PROMENADE_THREADS=${PROMENADE_THREADS:-1}
PROMENADE_WORKERS=${PROMENADE_WORKERS:-4}
if [ "$1" = 'server' ]; then
exec uwsgi \
--http ":${PORT}" \
--http-timeout "${UWSGI_TIMEOUT}" \
--harakiri "${UWSGI_TIMEOUT}" \
--socket-timeout "${UWSGI_TIMEOUT}" \
--harakiri-verbose \
-b 32768 \
--lazy-apps \
--master \
--thunder-lock \
--die-on-term \
-z "${UWSGI_TIMEOUT}" \
--paste config:/etc/promenade/api-paste.ini \
--enable-threads \
--threads "${PROMENADE_THREADS}" \
--workers "${PROMENADE_WORKERS}" \
--logger "null file:/dev/null" \
--log-route "null health"
fi
exec ${@}