From 2567ff9cec7a170dc0e493012f6e35d2dae6572e Mon Sep 17 00:00:00 2001 From: Pratik Borole Date: Sat, 18 May 2024 14:48:04 +0530 Subject: [PATCH] chore: add heroku and gunicorn --- Procfile | 1 + poetry.lock | 23 ++++++++++++++++++++++- pyproject.toml | 1 + 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 Procfile diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..d874c78 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: gunicorn -w 4 -k uvicorn.workers.UvicornWorker app.main:app diff --git a/poetry.lock b/poetry.lock index 9e41ef2..dc54c5d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -623,6 +623,27 @@ ufo = ["fs (>=2.2.0,<3)"] unicode = ["unicodedata2 (>=15.1.0)"] woff = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "zopfli (>=0.1.4)"] +[[package]] +name = "gunicorn" +version = "22.0.0" +description = "WSGI HTTP Server for UNIX" +optional = false +python-versions = ">=3.7" +files = [ + {file = "gunicorn-22.0.0-py3-none-any.whl", hash = "sha256:350679f91b24062c86e386e198a15438d53a7a8207235a78ba1b53df4c4378d9"}, + {file = "gunicorn-22.0.0.tar.gz", hash = "sha256:4a0b436239ff76fb33f11c07a16482c521a7e09c1ce3cc293c2330afe01bec63"}, +] + +[package.dependencies] +packaging = "*" + +[package.extras] +eventlet = ["eventlet (>=0.24.1,!=0.36.0)"] +gevent = ["gevent (>=1.4.0)"] +setproctitle = ["setproctitle"] +testing = ["coverage", "eventlet", "gevent", "pytest", "pytest-cov"] +tornado = ["tornado (>=0.2)"] + [[package]] name = "h11" version = "0.14.0" @@ -2704,4 +2725,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more [metadata] lock-version = "2.0" python-versions = "3.12.3" -content-hash = "e5ef0cc2d227178d1d974c9bd019b31258fcee13f7d5e375ef63ec9fb534119c" +content-hash = "d72171c003dd8bfed5bbe065f0fcbb34c863762e2710d139c3c0ab0a2b2bde23" diff --git a/pyproject.toml b/pyproject.toml index 7f8e8cc..ae0279c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,7 @@ readme = "README.md" [tool.poetry.dependencies] fastapi = "^0.111.0" fastf1 = "3.3.6" +gunicorn = "^22.0.0" newrelic = "^9.9.1" python = "3.12.3" python-dotenv = "^1.0.1"