forked from toddbirchard/plotlydash-flask-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (33 loc) · 836 Bytes
/
Makefile
File metadata and controls
42 lines (33 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
SRCPATH := $(CURDIR)
ENTRYPOINT := $(shell find $(SRCPATH) -name '*.ini')
PROJECTNAME := $(shell basename "$PWD")
define HELP
Manage $(PROJECTNAME).
Usage:
make run - Run uWSGI server for $(PROJECTNAME).
make restart - Purge cache & reinstall modules.
make update - Update npm production dependencies.
make clean - Remove cached files.
endef
export HELP
.PHONY: run restart update help
all help:
@echo "$$HELP"
.PHONY: run
run:
nohup uwsgi $(ENTRYPOINT) &
.PHONY: restart
restart:
pkill -9 -f $(shell uwsgi $(ENTRYPOINT))
nohup uwsgi $(ENTRYPOINT) &
.PHONY: update
update:
git pull origin master
pkill -9 -f $(shell uwsgi $(ENTRYPOINT))
poetry shell
poetry update
nohup uwsgi $(ENTRYPOINT) &
.PHONY: clean
clean:
find . -name '*.pyc' -delete
find . -name '__pycache__' -delete