[python-uk] Suggestions / best practices for deployment

Tim Diggins tim at red56.co.uk
Mon May 20 16:38:52 CEST 2013

On 20 May 2013 14:51, Harry Percival <harry.percival at gmail.com> wrote:

> Interesting points both.  I think it's insightful to think about the line
> beween provisioning and deployment... The idea that deployment shouldn't
> require root permissions is a good stake in the ground.
> In the book I've decided I'm going to take people through spinning up a
> server with Apache, and configuring two virtualhosts with mod_wsgi, one for
> staging and one for production.   We negotiate the gotchas, including
> setting up static files, using absolute paths and getting the permissions
> right for the (sqlite) database, etc.
> Then, deployment is a matter of updating the source code, updating any
> static files, and bouncing apache.
> Provisioning:
> - spinning up a server
> - installing apache
> - configuring apache
> Deployment:
> -updating source code
> -updating static files
> -migrate database
> -restart apache
> For those, the root/non-root perms thing holds pretty well, apart from the
> "restart apache" bit...  And, up to a certain point, what I talk about
> under "provisioning" is stuff that might vary from platform to platform,
> but stuff under "deployment" should be more universal...
> you shouldn't need to restart apache/nginx.
Touch the wsgi file and that part should restart automatically.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-uk/attachments/20130520/344b3029/attachment.html>

More information about the python-uk mailing list