|
|
|
|
|
by coderholic
5718 days ago
|
|
Another great tool that hasn't been mentioned yet is Fabric. Combined with a VCS it makes pushing changes to the server an absolute breeze. With the simple fabfile shown below I only need to do "fab update" to push all of the latest code to the server: #!/usr/bin/env python
from fabric.api import *
env.hosts = ['example.com']
def update():
local("./manage.py validate")
local("./manage.py test core")
with cd("/var/www/example"):
sudo("git pull origin master", user="www-data")
sudo("./manage.py migrate --all", user="www-data")
sudo("touch apache/django.wsgi", user="www-data")
|
|