-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
25 lines (21 loc) · 693 Bytes
/
Copy pathrun.sh
File metadata and controls
25 lines (21 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bash
# ---------------------------------------------------------------------------
# StreamChango launcher
# Listens on 127.0.0.1:8765 by default - put nginx in front of it.
# ---------------------------------------------------------------------------
set -e
cd "$(dirname "$0")"
if [ -d ".venv" ]; then
# shellcheck source=/dev/null
source .venv/bin/activate
fi
HOST="${HOST:-127.0.0.1}"
PORT="${PORT:-8765}"
WORKERS="${WORKERS:-1}" # MUST stay 1 - the chatango bot is a singleton
exec python -m uvicorn app.main:app \
--host "$HOST" \
--port "$PORT" \
--workers "$WORKERS" \
--proxy-headers \
--forwarded-allow-ips='*' \
--log-level info