Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Gunicorn #79

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Remove Gunicorn #79

wants to merge 1 commit into from

Conversation

a-musing-moose
Copy link
Contributor

@a-musing-moose a-musing-moose commented Jan 15, 2025

Uvicorn now has process management, so we can use that directly and remove the need for Gunicorn.

I also took the opportunity to update the default logging so it pretty closely matches the default logging format used by uvicorn. This prevents the jarring changed when the Django logging is configured.

resolves #70

@@ -16,8 +16,8 @@ psycopg = "^3.1.12"
python = "^3.12"
uvicorn = "^0.24.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue If we're relying on this being > 0.30.0, we should update it here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦🏼 - Thanks, that was a silly omission. I'm going to bump to the latest revision.

UVICORN_WORKERS="${UVICORN_WORKERS:-4}"

serve () {
exec uvicorn \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question the gunicorn config was in a config file, should this stay inline or be in a separate config file?

Copy link
Contributor Author

@a-musing-moose a-musing-moose Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, uvicorn does not support passing config as a file. Which is why I opted to switch back to inline config like this.

Copy link
Contributor

@jadedarko jadedarko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for going back and doing this!

I only have one tiny blocking change - pinning uvicorn higher than 0.30.0

Uvicorn now has process management, so we can use that directly and
remove the need for Gunicorn.

I also took the opportunity to update the default logging so it pretty
closely matches the default logging format used by uvicorn. This
prevents the jarring changed when the Django logging is configured.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop gunicorn
2 participants