-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
51 lines (38 loc) · 1.01 KB
/
Makefile
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
43
44
45
46
47
48
49
50
51
PATH := "$(PATH):$(HOME)/.local/bin"
CALL := env PATH=$(PATH) POETRY_VIRTUALENVS_IN_PROJECT=true poetry
GUNICORN_WORKERS ?= 1
FLY_REGION ?= ""
WRITABLE_REGION ?= ""
DEVSERVER_ARGS ?= ""
devserver:
$(CALL) run ./manage.py runserver $(DEVSERVER_ARGS)
install:
$(CALL) install --no-root
install-dev:
$(CALL) install --no-root --with dev
dep-update:
$(CALL) update
migrate:
@if [ $(FLY_REGION) = $(WRITABLE_REGION) ]; then \
$(CALL) run ./manage.py migrate;\
else \
echo "Running on non-writable node";\
fi
makemigrations:
$(CALL) run ./manage.py makemigrations
staticfiles:
$(CALL) run ./manage.py collectstatic --noinput
gunicorn:
$(CALL) run gunicorn osmcal.wsgi -b :8080 -w $(GUNICORN_WORKERS) --preload --access-logfile -
test:
$(CALL) run ./manage.py test
fixtures:
$(CALL) run ./manage.py loaddata osmcal/fixtures/demo.yaml
processtasks:
$(CALL) run ./manage.py process_tasks
periodic:
while true; do \
echo "Running clearsessions" ;\
$(CALL) run ./manage.py clearsessions ;\
sleep 86400 ;\
done;