Configure Postgresql to use a user called deploy.
Add Capistrano for deployment.