GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — june/fabfile.py at master · lilipan/june Expand file tree/ Copy pathfabfile.pyMore file actions 63 lines (46 loc) · 1.64 KB / Copy pathfabfile.pyFile metadata and controls63 lines (46 loc) · 1.64 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 # coding: utf-8 from fabric.api import env, local, cd, run, sudo from fabric.operations import put env.use_ssh_config = True env.keepalive = 60 def tarball(): """Create tarball for june.""" local('make static') local('python setup.py sdist --formats=gztar', capture=False) def upload(): """Upload tarball to the server.""" dist = local('python setup.py --fullname', capture=True).strip() run('rm -f ~/tmp/june.tar.gz') sudo('rm -fr ~/tmp/june') run('mkdir -p ~/tmp/june') put('dist/%s.tar.gz' % dist, '~/tmp/june.tar.gz') with cd('~/tmp/june'): run('tar xzf ~/tmp/june.tar.gz') def install(): """Install june package.""" dist = local('python setup.py --fullname', capture=True).strip() with cd('~/tmp/june/%s' % dist): sudo('/srv/venv/june/bin/pip install .') def restart(): """Restart remote server""" run('supervisorctl pid june | xargs kill -HUP') def bootstrap(): dist = local('python setup.py --fullname', capture=True).strip() tarball() upload() # prepare sudo('mkdir -p /var/log/june') sudo('mkdir -p /srv/venv') sudo('virtualenv /srv/venv/june') sudo('mkdir -p /www/june/public/static') install() # install patch sudo('/srv/venv/june/bin/pip install MySQL-python redis') with cd('~/tmp/june/%s' % dist): sudo('mv etc/nginx.conf /etc/nginx/conf.d/june.conf') sudo('mv etc/supervisord.conf /etc/supervisor/conf.d/june.conf') sudo('rm -fr /www/june/etc') sudo('mv etc /www/june/') sudo('rm -fr /www/june/public') sudo('mv june/public /www/june/') sudo('mv wsgi.py /www/june/') |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |