forked from crony/UpFast
Add gunicorn start script
This commit is contained in:
parent
71e1d3b335
commit
ffab901800
22
gunicorn_start
Executable file
22
gunicorn_start
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
NAME=upfast
|
||||||
|
# USER=upfast
|
||||||
|
# GROUP=upfast
|
||||||
|
WORKERS=3
|
||||||
|
WORKER_CLASS=uvicorn.workers.UvicornWorker
|
||||||
|
VENV=$DIR/.venv/bin/activate
|
||||||
|
BIND=unix:/tmp/upfast.lock
|
||||||
|
LOG_LEVEL=error
|
||||||
|
|
||||||
|
source $VENV
|
||||||
|
|
||||||
|
exec gunicorn main:app \
|
||||||
|
--name $NAME \
|
||||||
|
--workers $WORKERS \
|
||||||
|
--worker-class $WORKER_CLASS \
|
||||||
|
--bind=$BIND \
|
||||||
|
--log-level=$LOG_LEVEL \
|
||||||
|
--log-file=-
|
||||||
|
# --user=$USER \
|
||||||
|
# --group=$GROUP \
|
Loading…
Reference in New Issue
Block a user