2023-03-26 09:23:41 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
NAME=upfast
|
|
|
|
# USER=upfast
|
|
|
|
# GROUP=upfast
|
|
|
|
WORKERS=3
|
|
|
|
WORKER_CLASS=uvicorn.workers.UvicornWorker
|
2023-03-26 09:29:35 +02:00
|
|
|
VENV=venv/bin/activate
|
2023-03-26 09:33:53 +02:00
|
|
|
BIND=unix:/tmp/upfast.sock
|
2023-03-26 09:23:41 +02:00
|
|
|
LOG_LEVEL=error
|
|
|
|
|
|
|
|
source $VENV
|
|
|
|
|
|
|
|
exec gunicorn main:app \
|
|
|
|
--name $NAME \
|
|
|
|
--workers $WORKERS \
|
|
|
|
--worker-class $WORKER_CLASS \
|
|
|
|
--bind=$BIND \
|
|
|
|
--log-level=$LOG_LEVEL \
|
2023-03-26 09:44:25 +02:00
|
|
|
--log-file=- \
|
|
|
|
--forwarded-allow-ips='*'
|
2023-03-26 09:23:41 +02:00
|
|
|
# --user=$USER \
|
|
|
|
# --group=$GROUP \
|