schon/scripts/Docker/app-entrypoint.sh
2026-01-25 23:16:38 +03:00

11 lines
456 B
Bash

#!/usr/bin/bash
set -e
uv run manage.py await_services
if [ "${DEBUG:-0}" = "1" ]; then
uv run uvicorn --host 0.0.0.0 --port 8000 --reload --log-level debug --ws-ping-interval 20 --ws-ping-timeout 20 schon.asgi:application
else
UVICORN_WORKERS=${UVICORN_WORKERS:-4}
uv run uvicorn --host 0.0.0.0 --port 8000 --workers "$UVICORN_WORKERS" --proxy-headers --forwarded-allow-ips='*' --ws-ping-interval 20 --ws-ping-timeout 20 schon.asgi:application
fi