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):
"""Release 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 systemctl reload nginx")

View File

@ -1,35 +1,12 @@
ARCHIVE_DIR := voicegardens/archive
FIXED_ARCHIVE_DIR := voicegardens/fixed-archive
REMOTE_HOST := voicegardens.org
SERVER := voicegardens.server
STATIC_DIR := voicegardens/static
REMOTE_HOST := hbbs.decentral1.se
SERVER := hbbs.server
default: dev-serve
default: serve
dev-serve:
.PHONY: serve
serve:
@FLASK_ENV=development FLASK_APP=$(SERVER) flask run
prod-serve:
@gunicorn --workers 1 --bind 9090 $(SERVER):app
clear-local-archive:
@rm -rf $(ARCHIVE_DIR)/* && cp $(FIXED_ARCHIVE_DIR)/* $(ARCHIVE_DIR)
doesitsparkjoy:
.PHONY: hbbs
hbbs:
@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