Rejig the makefile

This commit is contained in:
Luke Murphy 2020-04-04 19:34:22 +02:00
parent 2882c356f0
commit c9a745e899
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
2 changed files with 8 additions and 31 deletions

2
fabfile.py vendored
View File

@ -7,6 +7,6 @@ from fabric import task
def hbbs(c): def hbbs(c):
"""Release hbbs.decentral1.se.""" """Release hbbs.decentral1.se."""
with c.cd("/var/www/hbbs.decentral1.se"): with c.cd("/var/www/hbbs.decentral1.se"):
c.run("git pull origin master") c.run("sudo -su www-data git pull origin master")
c.run("sudo supervisorctl restart apps:hbbs") c.run("sudo supervisorctl restart apps:hbbs")
c.run("sudo systemctl reload nginx") c.run("sudo systemctl reload nginx")

View File

@ -1,35 +1,12 @@
ARCHIVE_DIR := voicegardens/archive REMOTE_HOST := hbbs.decentral1.se
FIXED_ARCHIVE_DIR := voicegardens/fixed-archive SERVER := hbbs.server
REMOTE_HOST := voicegardens.org
SERVER := voicegardens.server
STATIC_DIR := voicegardens/static
default: dev-serve default: serve
dev-serve: .PHONY: serve
serve:
@FLASK_ENV=development FLASK_APP=$(SERVER) flask run @FLASK_ENV=development FLASK_APP=$(SERVER) flask run
prod-serve: .PHONY: hbbs
@gunicorn --workers 1 --bind 9090 $(SERVER):app hbbs:
clear-local-archive:
@rm -rf $(ARCHIVE_DIR)/* && cp $(FIXED_ARCHIVE_DIR)/* $(ARCHIVE_DIR)
doesitsparkjoy:
@fab -H $(REMOTE_HOST) doesitsparkjoy @fab -H $(REMOTE_HOST) doesitsparkjoy
voicegardens:
@fab -H $(REMOTE_HOST) voicegardens
cleanarchives:
@fab -H $(REMOTE_HOST) cleanarchives
dailycron:
@fab -H $(REMOTE_HOST) dailycron
hourlycron:
@fab -H $(REMOTE_HOST) hourlycron
release: doesitsparkjoy voicegardens
.PHONY: dev-serve prod-serve clear-local-archive doesitsparkjoy voicegardens cleanarchives dailycron release