Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
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"')