Commit ecc7ec0d authored by Nikolai R Kristiansen's avatar Nikolai R Kristiansen
Browse files

馃殌 Add fabfile for easier deployment

parent 1d7860df
import os
from fabric import Connection
from invoke import task
def deploy(c):
"""Make sure proxy_user is set to your neuf username."""
project_path = '/opt/mdb'
proxy_user = os.getenv('DEPLOY_USER', os.getenv('USER'))
c = Connection(host='', gateway=Connection('', user=proxy_user))
with, c.prefix('source {}/venv/bin/activate'.format(project_path)):'git pull') # Get source'pip install -U pip')'pip install -r requirements.txt') # install deps in virtualenv'python collectstatic --noinput') # Collect static'python migrate') # Run DB migrations
# Reload gunicorn
c.sudo('/usr/bin/supervisorctl pid | xargs kill -HUP', shell=False)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment