Only restart gunircorn if templates/packages changed.
This commit is contained in:
parent
f1f03ee3b6
commit
26a58ff6c8
6
Makefile
6
Makefile
@ -7,7 +7,7 @@ SHELL := /bin/bash
|
||||
|
||||
IGNORE = .git .env
|
||||
PYFILES := $(filter-out $(IGNORE),$(call rwildcard,.,*.py))
|
||||
|
||||
HTMLFILES := $(filter-out $(IGNORE),$(call rwildcard,.,*.html))
|
||||
|
||||
$(VENV)/touchfile: requirements.txt
|
||||
test -d $(VENV) || python3 -m venv $(VENV)
|
||||
@ -15,7 +15,7 @@ $(VENV)/touchfile: requirements.txt
|
||||
touch $(VENV)/touchfile
|
||||
|
||||
.PHONY: migrate
|
||||
migrate: ## Make and run migrations
|
||||
migrate: $(PYFILES) ## Make and run migrations
|
||||
$(PYTHON) manage.py makemigrations
|
||||
$(PYTHON) manage.py migrate
|
||||
$(PYTHON) manage.py collectstatic --noinput
|
||||
@ -29,7 +29,7 @@ pull:
|
||||
git pull origin master
|
||||
|
||||
.PHONY: start
|
||||
start: ## Start gunicorn
|
||||
start: $(HTMLFILES) $(PYFILES) ## Restart gunicorn
|
||||
sudo systemctl restart gunicorn.service gunicorn.socket
|
||||
|
||||
.PHONY: update
|
||||
|
Loading…
Reference in New Issue
Block a user