Slides for my talk at PyCon Italy 2017 (PyCon Otto): https://www.pycon.it/conference/talks/deploy-automatizzato-di-un-progetto-python-3-django-con-ansible
Abstract:
My web application is ready and it runs smoothly on my machine with the development server, but I’m not sure how to move it to a production environment. There are several on line services that offer single click deployment that are OK for simple web sites but are not fully configurable and hide the way your project is actually deployed. Even if many developers are using clever PaaS solutions, it is still worth understanding how to build from scratch a production environment with Linux, Python 3, Django, NGiNX and uWSGI. In the talk this classic stack will be briefly presented and afterwards it will be shown how to automate the configuration and the deployment procedure with an Ansible playbook that will be made available. A particular emphasis will be laid on how to use environment variables to configure the project following the twelve-factor-app approach. The most important concepts about Ansible will also be covered (playbooks, roles, templates, modules, inventories).