Skip to content

Commit

Permalink
runs w gunicorn
Browse files Browse the repository at this point in the history
  • Loading branch information
fullerzz committed Jul 14, 2024
1 parent 846ac14 commit 79af537
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ cython_debug/
scripts/*
!scripts/start_dev.sh
!scripts/test.sh
!scripts/start_w_gunicorn.sh

# local file cache
uploads/*
Expand Down
23 changes: 22 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ python-multipart = "^0.0.9"
beartype = "^0.18.5"
python-dotenv = "^1.0.1"
pydantic-settings = "^2.3.4"
uvicorn = {extras = ["standard"], version = "^0.30.1"}
gunicorn = "^22.0.0"


[tool.poetry.group.dev.dependencies]
Expand Down
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ greenlet==3.0.3 ; python_version < "3.13" and (platform_machine == "aarch64" or
--hash=sha256:fcd2469d6a2cf298f198f0487e0a5b1a47a42ca0fa4dfd1b6862c999f018ebbf \
--hash=sha256:fd096eb7ffef17c456cfa587523c5f92321ae02427ff955bebe9e3c63bc9f0da \
--hash=sha256:fe754d231288e1e64323cfad462fcee8f0288654c10bdf4f603a39ed923bef33
gunicorn==22.0.0 ; python_version >= "3.11" and python_version < "4.0" \
--hash=sha256:350679f91b24062c86e386e198a15438d53a7a8207235a78ba1b53df4c4378d9 \
--hash=sha256:4a0b436239ff76fb33f11c07a16482c521a7e09c1ce3cc293c2330afe01bec63
h11==0.14.0 ; python_version >= "3.11" and python_version < "4.0" \
--hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \
--hash=sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761
Expand Down Expand Up @@ -258,6 +261,9 @@ orjson==3.10.6 ; python_version >= "3.11" and python_version < "4.0" \
--hash=sha256:f759503a97a6ace19e55461395ab0d618b5a117e8d0fbb20e70cfd68a47327f2 \
--hash=sha256:fb0ee33124db6eaa517d00890fc1a55c3bfe1cf78ba4a8899d71a06f2d6ff5c7 \
--hash=sha256:fd502f96bf5ea9a61cbc0b2b5900d0dd68aa0da197179042bdd2be67e51a1e4b
packaging==24.1 ; python_version >= "3.11" and python_version < "4.0" \
--hash=sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002 \
--hash=sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124
pydantic-core==2.20.1 ; python_version >= "3.11" and python_version < "4.0" \
--hash=sha256:035ede2e16da7281041f0e626459bcae33ed998cca6a0a007a5ebb73414ac72d \
--hash=sha256:04024d270cf63f586ad41fff13fde4311c4fc13ea74676962c876d9577bcc78f \
Expand Down
3 changes: 3 additions & 0 deletions scripts/start_w_gunicorn.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

gunicorn src.smolvault.main:app --workers 2 --worker-class uvicorn.workers.UvicornWorker
3 changes: 0 additions & 3 deletions src/smolvault/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
from beartype.claw import beartype_this_package # <-- this is boring, but...

beartype_this_package() # <-- the fast way

0 comments on commit 79af537

Please sign in to comment.