Files
Pygentic-AI/bin/start.sh
Francis Secada abad0c4d11 fix: add default values for WORKERS, TIMEOUT, PORT in startup scripts
Gunicorn crashes on container start when these env vars are missing from
stack.env — -w receives no argument and exits immediately. Defaults now
match .env.example values (WORKERS=4, TIMEOUT=120, PORT=5051), consistent
with the bash default syntax already used in compose.yaml.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02 21:29:16 -05:00

12 lines
328 B
Bash
Executable File

#!/bin/bash
__dir="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
cd ${__dir}/../../ || exit
source .venv/bin/activate
cd src || exit
# python -m backend.utils
gunicorn main:app -w ${WORKERS:-4} -k uvicorn.workers.UvicornWorker \
--timeout "${TIMEOUT:-120}" \
--forwarded-allow-ips "*" \
-b 0.0.0.0:"${PORT:-5051}"