feat(api): use uvicorn as asgi server with gunicorn

This commit is contained in:
jo 2022-07-06 17:25:04 +02:00 committed by Kyle Robbertze
parent 1cb03c35d2
commit 7c26020c80
3 changed files with 6 additions and 2 deletions

View file

@ -13,9 +13,10 @@ Environment=LIBRETIME_CONFIG_FILEPATH=@@CONFIG_FILEPATH@@
ExecStart=/usr/bin/gunicorn \
--workers 4 \
--worker-class uvicorn.workers.UvicornWorker \
--log-file - \
--bind unix:/run/libretime-api.sock \
libretime_api.wsgi
libretime_api.asgi
ExecReload=/bin/kill -s HUP $MAINPID
User=libretime
Group=libretime

View file

@ -5,7 +5,7 @@ PartOf=libretime-api.service
[Socket]
ListenStream=/run/libretime-api.sock
SocketUser=@@DEFAULT_WEB_USER@@
SocketMode=640
SocketMode=660
[Install]
WantedBy=sockets.target