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

Migrate from uwsgi to gunicorn + make dockerfile suitable for prod #29

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

siddharthvp
Copy link
Collaborator

  • uwsgi requires the entire C compile toolchain so ends up raising docker image size to >500 MB and slows down the build.
  • Remove ARG=dev/test in dockerfile which seems to be unused. This also enables removal of apt-get update/upgrade which reduces image size further, down to 209 MB.
  • uwsgi was never included in requirements.txt as it wasn't needed for the dev setup. But as gunicorn is quick to download, have added it.

* uwsgi requires the entire C compile toolchain so ends up raising docker image size to >500 MB and slows down the build.
* Remove ARG=dev/test in dockerfile which seems to be unused. This also enables removal of apt-get update/upgrade which reduces image size further, down to 209 MB.
* uwsgi was never included in requirements.txt as it wasn't needed for the dev setup. But as gunicorn is quick to download, have added it.
@siddharthvp
Copy link
Collaborator Author

According to https://python-docs.readthedocs.io/en/latest/scenarios/web.html, Gunicorn is the "recommended choice for new Python web applications today".

@siddharthvp siddharthvp mentioned this pull request Oct 17, 2023
Copy link
Contributor

@vivian-rook vivian-rook left a comment

Choose a reason for hiding this comment

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

Awesome

@vivian-rook vivian-rook merged commit 03900ff into main Oct 17, 2023
@vivian-rook vivian-rook deleted the gunicorn branch October 17, 2023 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants