An online landscape, built as a tool to explore the many aspects of the human voice.
https://voicegardens.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.6 KiB
50 lines
1.6 KiB
"""Deployment with Fabric."""
|
|
|
|
from fabric import task
|
|
|
|
@task
|
|
def doesitsparkjoy(c):
|
|
"""Release doesitsparkjoy.voicegardens.org."""
|
|
print('Releasing doesitsparkjoy.voicegardens.org ...')
|
|
with c.cd('/var/www/doesitsparkjoy.voicegardens.org'):
|
|
c.run('git pull origin master')
|
|
c.run('sudo supervisorctl restart doesitsparkjoy')
|
|
c.run('sudo systemctl restart nginx')
|
|
c.run('sh bin/clear-archives')
|
|
c.run('sh bin/copy-fixed-archive')
|
|
print('Released <3')
|
|
|
|
@task
|
|
def voicegardens(c):
|
|
"""Release voicegardens.org."""
|
|
print('Releasing voicegardens.org ...')
|
|
with c.cd('/var/www/voicegardens.org'):
|
|
c.run('git pull origin master')
|
|
c.run('sudo supervisorctl restart voicegardens')
|
|
c.run('sudo systemctl restart nginx')
|
|
c.run('sh bin/clear-archives')
|
|
c.run('sh bin/copy-fixed-archive')
|
|
print('Released <3')
|
|
|
|
@task
|
|
def dailycron(c):
|
|
"""Copy new crontab."""
|
|
print('Copy over new crontab ...')
|
|
# See https://github.com/fabric/fabric/issues/1750
|
|
c.put('./cron/voicegardens', remote='./')
|
|
c.sudo('mv voicegardens /etc/cron.daily')
|
|
c.sudo('chown root:root /etc/cron.daily/voicegardens')
|
|
print('New cron in place <3')
|
|
|
|
@task
|
|
def cleanarchives(c):
|
|
"""Remove all archives."""
|
|
print('Removing the doesitsparkjoy.voicegardens.org archives ...')
|
|
with c.cd('/var/www/doesitsparkjoy.voicegardens.org'):
|
|
c.run('rm -rf ./voicegardens/archive/*')
|
|
|
|
print('Removing the voicegardens.org archives ...')
|
|
with c.cd('/var/www/voicegardens.org'):
|
|
c.run('rm -rf ./voicegardens/archive/*')
|
|
|
|
print('Deleted <3')
|
|
|