diff --git a/bin/start.sh b/bin/start.sh index a4308a9..ad4b78e 100755 --- a/bin/start.sh +++ b/bin/start.sh @@ -5,7 +5,7 @@ cd ${__dir}/../../ || exit source .venv/bin/activate cd src || exit # python -m backend.utils -gunicorn main:app -w ${WORKERS} -k uvicorn.workers.UvicornWorker \ ---timeout "${TIMEOUT}" \ +gunicorn main:app -w ${WORKERS:-4} -k uvicorn.workers.UvicornWorker \ +--timeout "${TIMEOUT:-120}" \ --forwarded-allow-ips "*" \ --b 0.0.0.0:"${PORT}" +-b 0.0.0.0:"${PORT:-5051}" diff --git a/compose.yaml b/compose.yaml index 2a81298..a342563 100644 --- a/compose.yaml +++ b/compose.yaml @@ -12,7 +12,7 @@ services: ports: - "0.0.0.0:${PORT:-5051}:${INTERNAL_PORT:-5051}" env_file: - - ./stack.env + - ./.env environment: - PORT=${INTERNAL_PORT:-5051} - SERVER_ENV=${SERVER_ENV:-prod} @@ -46,7 +46,7 @@ services: memory: ${CELERY_MEMORY_RESERVATION:-256mb} command: bash -c "/opt/pygentic_ai/docker/celery/start.sh" env_file: - - ./stack.env + - ./.env environment: - PORT=${CELERY_PORT:-5052} - SERVER_ENV=${SERVER_ENV:-prod} diff --git a/docker/pygentic_ai/python_start.sh b/docker/pygentic_ai/python_start.sh index 62d098f..f085abc 100755 --- a/docker/pygentic_ai/python_start.sh +++ b/docker/pygentic_ai/python_start.sh @@ -4,7 +4,7 @@ __dir="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" cd ${__dir}/../.. || exit source .venv/bin/activate cd src || exit -gunicorn app:app -w ${WORKERS} -k uvicorn.workers.UvicornWorker \ ---timeout "${TIMEOUT}" \ +gunicorn app:app -w ${WORKERS:-4} -k uvicorn.workers.UvicornWorker \ +--timeout "${TIMEOUT:-120}" \ --forwarded-allow-ips "*" \ --b 0.0.0.0:"${PORT}" +-b 0.0.0.0:"${PORT:-5051}"