In this recipe, we will continue working from the previous recipe and will implement an Ansible script (playbook) to set up a production environment with Nginx and Gunicorn.
Deploying on Nginx and Gunicorn for the production environment
Getting ready
Check that your project configuration doesn't raise warnings when you run the following:
(env)$ python manage.py check --deploy --settings=myproject.settings.production
Make sure to have the latest stable version of Ansible.
Choose a server provider and create a dedicated server there with root access via ssh by private and public key authentication. My provider of choice is DigitalOcean (https://www.digitalocean.com/). At DigitalOcean control panel, I created a dedicated...