Newer
Older

Jeremy M Fee
committed

Jeremy M Fee
committed
# Environment variable to determine whether to start webservice
export WEBSERVICE=${WEBSERVICE:-false}

Jeremy M Fee
committed
if [ "${WEBSERVICE}" = "false" ]; then
# run arguments as command, or bash prompt if no arguments
exec "${@:-/bin/bash}"
else

Jeremy M Fee
committed
# run gunicorn server for web service

Jeremy M Fee
committed
exec gunicorn \

Jeremy M Fee
committed
--access-logfile - \
--bind 0.0.0.0:8000 \
--threads 2 \
--workers 2 \
--worker-class uvicorn.workers.UvicornWorker \
--worker-tmp-dir /dev/shm \
geomagio.api:app