Describing the setup
From a high level, here is what needs to happen in order to take an application that we have developed from a desktop to deployment. In order to deploy your application, you will provision two hosts, web
and db
(each with one user account) and webapp
, whose home directory will be in /home/webapp
. The source code will be hosted on GitHub and deployed using Git onto the web server. We will create a database, provision an account to access that database, and then configure and deploy a web.py
application in a virtual Python environment that will be started and monitored by supervisord. This is a fairly common pattern for modern web applications, regardless of the framework and language being used. The demonstration application used in this chapter consists of only a handful of files making it easy to deploy and understand, but this will give you the concepts and tools to expand this example for use with future applications you might develop or need to deploy.