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

Add some info about Gunicorn #64

Open
Raruto opened this issue Sep 7, 2022 · 2 comments
Open

Add some info about Gunicorn #64

Raruto opened this issue Sep 7, 2022 · 2 comments
Labels
docs Improvements or additions to documentation

Comments

@Raruto
Copy link
Collaborator

Raruto commented Sep 7, 2022

As per v3.4, this is what is currently reported in the /scripts/docker-entrypoint.sh file::

gunicorn base.wsgi:application \
--limit-request-fields 0 \
--error-logfile - \
--log-level=debug \
--timeout ${G3WSUITE_GUNICORN_TIMEOUT:-120} \
--workers=${G3WSUITE_GUNICORN_NUM_WORKERS:-8} \
--max-requests=${G3WSUITE_GUNICORN_MAX_REQUESTS:-200} \
-b 0.0.0.0:8000

But currently the README.md file reports this stack without any other mention of gunicorn:

stack

This is what we can currently find in the documentation:

@Raruto
Copy link
Collaborator Author

Raruto commented Sep 8, 2022

For example, the following might be a useful local development tip (in order to speed up container startup times):

G3WSUITE_GUNICORN_NUM_WORKERS=1

@Raruto Raruto added the docs Improvements or additions to documentation label Sep 22, 2022
@Raruto
Copy link
Collaborator Author

Raruto commented Sep 27, 2022


Source: https://docs.gunicorn.org/en/stable/configure.html


Gunicorn reads configuration information from five places (in order of least to most authoritative:):

  1. Environment Variables
  2. Framework Settings (see also: Django integration)
  3. Configuration File (eg. gunicorn.conf.py) related to: #79
  4. GUNICORN_CMD_ARGS
  5. Command Line

Source: https://docs.gunicorn.org/en/stable/index.html


Gunicorn (‘Green Unicorn’) is a Python WSGI HTTP Server for UNIX broadly compatible with various web frameworks, simply implemented, light on server resources, and fairly speedy.


Source: https://docs.gunicorn.org/en/stable/deploy.html


It's strongly recommend using Gunicorn behind a proxy server. although there are many HTTP proxies available, we strongly advise that you use Nginx. If you choose another proxy server you need to make sure that it buffers slow clients when you use default Gunicorn workers. Without this buffering Gunicorn will be easily susceptible to denial-of-service attacks. You can use Hey to check if your proxy is behaving properly.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant