schon/scripts/Docker/app-entrypoint.sh
Egor fureunoir Gorbunov e0e3c93e63 refactor(scripts): centralize static files collection in Docker entrypoint
Moved static files collection from platform-specific scripts to the Docker entrypoint script. Simplifies maintenance by eliminating redundant logic across Windows, Unix, and restart scripts.

Updated logo/icon settings to use `static()` for better flexibility.
2026-03-05 00:07:41 +03:00

12 lines
511 B
Bash

#!/usr/bin/bash
set -e
uv run manage.py await_services
uv run manage.py collectstatic --noinput --verbosity 0
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