This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
infoskjerm2/fabfile.py
T
2018-03-17 12:35:58 +01:00

18 lines
592 B
Python

from fabric.api import run, sudo, env, cd
env.use_ssh_config = True
env.hosts = ['dreamcast.neuf.no']
env.project_path = '/var/www/neuf.no/infoskjerm2'
env.user = 'gitdeploy'
def deploy():
with cd(env.project_path):
run('git pull') # Get source
run('pipenv install') # install deps in virtualenv
run('umask 022; pipenv run python manage.py collectstatic --noinput') # Collect static
run('pipenv run python manage.py migrate') # Run DB migrations
# Reload
sudo('/usr/bin/supervisorctl pid infoskjerm.neuf.no | xargs kill -HUP', shell=False)