This package features 2 new management commands
manage.py devserver
- this is a simple rename ofrunserver
manage.py prodserver
- this will start your wsgi/asgi server
Includes in this package are configurations for gunicorn, waitress and uvicorn (wgsi & asgi)
- django-click
- your wsgi/asgi server of choice
You can install django-prodserver via pip from PyPI:
$ pip install django_prodserver
Add the following settings:
INSTALLED_APPS += ["django_prodserver"]
PROD_SERVERS = {
'web': {
"BACKEND": "django_prodserver.backends.gunicorn.GunicornServer",
"ARGS": [
"--bind=0.0.0.0:8111"
# other gunicorn commmand line args go here
]
}
}
Then you will be able to use the management command like so:
$ python manage.py prodserver web
Please see the Command-line Reference for details.
Contributions are very welcome. To learn more, see the Contributor Guide.
Distributed under the terms of the MIT license, django-prodserver is free and open source software.
If you encounter any problems, please file an issue along with a detailed description.
This project was generated from @OmenApps's Cookiecutter Django Package template.