3cf4a9a40a
python / test (push) Failing after 8s
- Updated README.md to reflect new features and API changes. - Introduced versioning in app initialization. - Enhanced configuration management in app/config.py with new validation functions. - Refactored main.py to improve request handling and response generation. - Added new models in app/models.py for structured API responses. - Implemented a dedicated UI rendering function in app/ui.py. - Improved Docker configuration for better security and health checks. - Updated tests to cover new validation rules and response formats. - Added CLAUDE.md for project guidelines and working rules.
32 lines
609 B
Bash
32 lines
609 B
Bash
#!/bin/sh
|
|
set -eu
|
|
|
|
HOST="${FACE_LOCK_HOST:-0.0.0.0}"
|
|
PORT="${PORT:-8000}"
|
|
WORKERS="${WEB_CONCURRENCY:-2}"
|
|
LOG_LEVEL="${LOG_LEVEL:-info}"
|
|
KEEPALIVE="${UVICORN_KEEPALIVE_TIMEOUT:-5}"
|
|
|
|
case "$WORKERS" in
|
|
''|*[!0-9]*)
|
|
echo "WEB_CONCURRENCY must be a positive integer" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
case "$PORT" in
|
|
''|*[!0-9]*)
|
|
echo "PORT must be a positive integer" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exec python -m uvicorn app.main:app \
|
|
--host "$HOST" \
|
|
--port "$PORT" \
|
|
--workers "$WORKERS" \
|
|
--timeout-keep-alive "$KEEPALIVE" \
|
|
--proxy-headers \
|
|
--no-server-header \
|
|
--log-level "$LOG_LEVEL"
|