Rejig the makefile
This commit is contained in:
parent
2882c356f0
commit
c9a745e899
2
fabfile.py
vendored
2
fabfile.py
vendored
@ -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")
|
||||||
|
37
makefile
37
makefile
@ -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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user