openreplay/ee/api/entrypoint.sh
ⵄⵎⵉⵔⵓⵛ ⴰⵎⴰⵣⵉⵖ 39ca414137 feat(api): use the default sync worker class, and only one worker.
The default worker class of gunicorn is 'sync', and that is what is
expected by api codebase.

Increasing the load capacity of an api cluster must be done with:

  a) number of sync gunicorn workers;

  b) number of spawned gunicorn servers;

  c) number of chalice containers;

Infrastructure can choose what is most convenient, and efficient.
2023-11-30 18:08:03 +01:00

7 lines
253 B
Bash
Executable file

#!/bin/sh
sh env_vars.sh
source /tmp/.env.override
#uvicorn app:app --host 0.0.0.0 --port $LISTEN_PORT --proxy-headers
NB_WORKERS="${NB_WORKERS:=4}"
gunicorn app:app --workers $NB_WORKERS --bind 0.0.0.0:$LISTEN_PORT --log-level ${S_LOGLEVEL:-warning}