Add startup script and socket directory for gunicorn
This commit is contained in:
parent
0b4322d671
commit
f78ed7592d
0
run/.gitkeep
Normal file
0
run/.gitkeep
Normal file
24
start.sh
Executable file
24
start.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
NAME=ismijnipverweg
|
||||
DIR=/opt/apps/ismijnipverweg/app
|
||||
USER=www
|
||||
GROUP=nobody
|
||||
WORKERS=3
|
||||
WORKER_CLASS=uvicorn.workers.UvicornWorker
|
||||
#VENV=$DIR/.venv/bin/activate
|
||||
BIND=unix:$DIR/../run/gunicorn.sock
|
||||
LOG_LEVEL=debug
|
||||
|
||||
cd $DIR
|
||||
# source $VENV
|
||||
|
||||
exec gunicorn main:app \
|
||||
--name $NAME \
|
||||
--workers $WORKERS \
|
||||
--worker-class $WORKER_CLASS \
|
||||
--user=$USER \
|
||||
--group=$GROUP \
|
||||
--bind=$BIND \
|
||||
--log-level=$LOG_LEVEL \
|
||||
--log-file=-
|
Loading…
x
Reference in New Issue
Block a user