-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (36 loc) · 993 Bytes
/
Makefile
File metadata and controls
48 lines (36 loc) · 993 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
43
44
45
46
47
48
CALL := uv
GUNICORN_WORKERS ?= 1
FLY_REGION ?= ""
WRITABLE_REGION ?= ""
DEVSERVER_ARGS ?= ""
REVERSE_PROXY_CIDR ?= "*"
devserver:
$(CALL) run ./manage.py runserver $(DEVSERVER_ARGS)
install:
$(CALL) sync --no-dev --frozen
install-dev:
$(CALL) sync --frozen
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) --timeout 60 --access-logfile - --error-logfile - --forwarded-allow-ips=$(REVERSE_PROXY_CIDR)
test:
$(CALL) run ./manage.py test
fixtures:
$(CALL) run ./manage.py loaddata osmcal/fixtures/demo.yaml
processtasks:
$(CALL) run ./manage.py db_worker
periodic:
while true; do \
echo "Running clearsessions" ;\
$(CALL) run ./manage.py clearsessions ;\
sleep 86400 ;\
done;