Skip to content
Myr

Merge pull request #228 from akavlie/master

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Corrections to fabfile example

authored by Armin Ronacher · committed by Armin Ronacher · parents 15c937b, c6e4d74 · Browse files · 1 file+5 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−5 removed

  • other:+5 added−5 removed

1 file+5 added−5 removed

modified:docs/patterns/fabric.rst+5 added-5 removed
30 unmodified lines
31hosts. These hosts can be defined either in the fabfile or on the command32line. In this case we will add them to the fabfile.3334This is a basic first example that has the ability to upload the current35sourcecode to the server and install it into a already existing35sourcecode to the server and install it into a pre-existing36virtual environment::3738 from fabric.api import *39
12 unmodified lines
52 # upload the source tarball to the temporary folder on the server53 put('dist/%s.tar.gz' % dist, '/tmp/yourapplication.tar.gz')54 # create a place where we can unzip the tarball, then enter55 # that directory and unzip it56 run('mkdir yourapplication')56 run('mkdir /tmp/yourapplication')57 with cd('/tmp/yourapplication'):58 run('tar xzf /tmp/yourapplication.tar.gz')59 # now setup the package with our virtual environment's60 # python interpreter61 run('/var/www/yourapplication/env/bin/python setup.py install')59 # now setup the package with our virtual environment's60 # python interpreter61 run('/var/www/yourapplication/env/bin/python setup.py install')62 # now that all is set up, delete the folder again63 run('rm -rf /tmp/yourapplication /tmp/yourapplication.tar.gz')64 # and finally touch the .wsgi file so that mod_wsgi triggers65 # a reload of the application
131 unmodified lines