File size: 364 Bytes
e5ba726
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
set -euo pipefail

export PORT="${PORT:-7860}"
export UVICORN_WORKERS="${UVICORN_WORKERS:-1}"
export MAX_CONCURRENT_REQUESTS="${MAX_CONCURRENT_REQUESTS:-2}"
export MAX_WORKERS="${MAX_WORKERS:-2}"

exec uvicorn app:app \
  --host 0.0.0.0 \
  --port "$PORT" \
  --workers "$UVICORN_WORKERS" \
  --loop asyncio \
  --http h11 \
  --limit-concurrency 1000