From ffab901800a59c4ec7b5da1aa90f9b16ef2b2733 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Sun, 26 Mar 2023 09:23:41 +0200 Subject: [PATCH] Add gunicorn start script --- gunicorn_start | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 gunicorn_start diff --git a/gunicorn_start b/gunicorn_start new file mode 100755 index 0000000..f8e4bf6 --- /dev/null +++ b/gunicorn_start @@ -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 \