We have used uWSGI with Nginx to deploy a Django application. A uWSGI project aims at developing a full stack to build hosting services. It has a pluggable architecture to support more platforms, and a common configuration style. To deploy the Django application, we have used the
.ini file to save all the configurations of the Python application.
We'll not go into the details of a uWSGI application now. Please refer to the following uWSGI documentation for detailed information:
An interesting bit of our recipe is to restart services with an upstream script. A service tells Chef-Solo to use one of the OS-specific providers. First, we create a
.conf file in the
init folder to handle the service script. Then, the
service resource of Chef supports multiple attributes for start, reload, and status commands:
template "/etc/init/django_app.conf" do source "django_app.conf.erb" owner "root" group "root" mode...