Skip to content
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (14 sloc) 570 Bytes
import getpass
import os
from fabric import task, Connection, Config
def deploy(c):
sudo_pass = os.environ.get('SUDO_PW')
if not sudo_pass:
sudo_pass = getpass.getpass("sudo password? (or set $SUDO_PW): ")
config = Config(overrides={'sudo': {'password': sudo_pass}})
c = Connection(host='', user=os.environ['POSTGRES_US'], config=config)
with'hellowebbooks/hellowebbooks'):'git pull origin master')
c.sudo('systemctl restart gunicorn')
c.sudo('journalctl -u gunicorn --since "1 min ago"')
You can’t perform that action at this time.