run-uvicorn.sh 460 B

12345678910111213141516171819202122
  1. #!/usr/bin/env sh
  2. WORKERS=${WEB_CONCURRENCY:-1}
  3. HOST=${UVICORN_HOST:-0.0.0.0}
  4. PORT=${UVICORN_PORT:-8000}
  5. LOG_LEVEL=${UVICORN_LOG_LEVEL:-info}
  6. echo "Start GlitchTip with ${WORKERS} uvicorn worker(s)"
  7. shutdown() {
  8. kill -TERM "$server_pid"
  9. wait "$server_pid"
  10. exit 0
  11. }
  12. trap shutdown INT TERM
  13. uvicorn glitchtip.asgi:application --host $HOST --port $PORT --workers $WORKERS --log-level $LOG_LEVEL --lifespan off &
  14. server_pid=$!
  15. wait "$server_pid"