From 8c60d90a7079c5063843a4b0986d7dcea31c3a02 Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Sun, 14 May 2023 15:40:19 +0200 Subject: [PATCH] Use uvicorn --- poetry.lock | 25 ++----------------------- pyproject.toml | 1 - scripts/start_production.sh | 2 +- 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/poetry.lock b/poetry.lock index 586f25a..faa6bd3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -338,27 +338,6 @@ files = [ docs = ["Sphinx", "docutils (<0.18)"] test = ["objgraph", "psutil"] -[[package]] -name = "gunicorn" -version = "20.1.0" -description = "WSGI HTTP Server for UNIX" -category = "main" -optional = false -python-versions = ">=3.5" -files = [ - {file = "gunicorn-20.1.0-py3-none-any.whl", hash = "sha256:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e"}, - {file = "gunicorn-20.1.0.tar.gz", hash = "sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8"}, -] - -[package.dependencies] -setuptools = ">=3.0" - -[package.extras] -eventlet = ["eventlet (>=0.24.1)"] -gevent = ["gevent (>=1.4.0)"] -setproctitle = ["setproctitle"] -tornado = ["tornado (>=0.2)"] - [[package]] name = "h11" version = "0.14.0" @@ -1130,7 +1109,7 @@ tornado = ["tornado (>=5)"] name = "setuptools" version = "67.7.2" description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "main" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1487,4 +1466,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "d6f5dc3e32f4591829e3a0ebc4e5f31af27583027d8da749822725503a6eb6a3" +content-hash = "4b0fc3b2f0b0d39d63b5a07999df9d9980785b5cf87c4cd0bc85966d87ecfc9a" diff --git a/pyproject.toml b/pyproject.toml index f5316cc..620d5da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,6 @@ httpx = "^0.24.0" orjson = "^3.8.12" prometheus-fastapi-instrumentator = "^6.0.0" uvloop = "^0.17.0" -gunicorn = "^20.1.0" sentry-sdk = "^1.22.2" redis = {extras = ["hiredis"], version = "^4.5.5"} ormsgpack = "^1.2.6" diff --git a/scripts/start_production.sh b/scripts/start_production.sh index db5e2b7..2321823 100644 --- a/scripts/start_production.sh +++ b/scripts/start_production.sh @@ -4,4 +4,4 @@ rm -rf prometheus mkdir prometheus alembic -c ./app/alembic.ini upgrade head -gunicorn -k uvicorn.workers.UvicornWorker main:app --bind 0.0.0.0:8080 +uvicorn main:app --host 0.0.0.0 --port 8080