Skip to content

Instantly share code, notes, and snippets.

@danhper
Created July 12, 2017 10:26
Show Gist options
  • Save danhper/620c038a3fa9a7db74028af29335c056 to your computer and use it in GitHub Desktop.
Save danhper/620c038a3fa9a7db74028af29335c056 to your computer and use it in GitHub Desktop.
Sample fabfile.py
from fabric.api import run, env, cd
env.hosts = ['host1', 'host2']
def deploy():
with cd("~/my-project"):
run("git fetch")
run("git checkout --force origin/master")
run("make setup")
run("make restart_app")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment