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.

fabfile.py 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. """Deployment with Fabric."""
  2. from fabric import task
  3. @task
  4. def doesitsparkjoy(c):
  5. """Release doesitsparkjoy.voicegardens.org."""
  6. print('Releasing doesitsparkjoy.voicegardens.org ...')
  7. with c.cd('/var/www/doesitsparkjoy.voicegardens.org'):
  8. c.run('git pull origin master')
  9. c.run('sudo supervisorctl restart apps:doesitsparkjoy')
  10. c.run('sudo systemctl restart nginx')
  11. print('Released <3')
  12. @task
  13. def voicegardens(c):
  14. """Release voicegardens.org."""
  15. print('Releasing voicegardens.org ...')
  16. with c.cd('/var/www/voicegardens.org'):
  17. c.run('git pull origin master')
  18. c.run('sudo supervisorctl restart apps:voicegardens')
  19. c.run('sudo systemctl restart nginx')
  20. print('Released <3')
  21. @task
  22. def dailycron(c):
  23. """Copy new daily crontab."""
  24. print('Copy over new daily crontab ...')
  25. # See https://github.com/fabric/fabric/issues/1750
  26. c.put('./bin/voicegardens-cron-daily', remote='./')
  27. c.sudo('mv voicegardens-cron-daily /etc/cron.daily')
  28. c.sudo('chown root:root /etc/cron.daily/voicegardens-cron-daily')
  29. print('New daily cron in place <3')
  30. @task
  31. def hourlycron(c):
  32. """Copy new hourly crontab."""
  33. print('Copy over new hourly crontab ...')
  34. # See https://github.com/fabric/fabric/issues/1750
  35. c.put('./bin/voicegardens-cron-hourly', remote='./')
  36. c.sudo('mv voicegardens-cron-hourly /etc/cron.hourly')
  37. c.sudo('chown root:root /etc/cron.hourly/voicegardens-cron-hourly')
  38. print('New hourly cron in place <3')
  39. @task
  40. def cleanarchives(c):
  41. """Remove all archives."""
  42. print('Removing the doesitsparkjoy.voicegardens.org archives ...')
  43. with c.cd('/var/www/doesitsparkjoy.voicegardens.org'):
  44. c.run('rm -rf ./voicegardens/archive/*')
  45. print('Removing the voicegardens.org archives ...')
  46. with c.cd('/var/www/voicegardens.org'):
  47. c.run('rm -rf ./voicegardens/archive/*')
  48. print('Deleted <3')