forked from polyrabbit/WeCron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (39 loc) · 1.23 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
.PHONY: run clean test docs collectstatic run-in-prod run-uwsgi-test
VCAP_APP_PORT ?= 8000
PORT ?= $(VCAP_APP_PORT)
run:
python WeCron/manage.py runserver 0.0.0.0:$(PORT)
run-in-prod: clean docs syncdb collectstatic
# uwsgi --ini=deploy/conf/uwsgi.ini.j2 --http :$(PORT)
exec uwsgi --ini=deploy/conf/uwsgi.ini --http :$(PORT)
run-uwsgi-test:
uwsgi --chdir=WeCron \
--module=wecron.wsgi:application \
--env DJANGO_SETTINGS_MODULE=wecron.settings \
--strict \
--http :$(PORT) \
--worker-reload-mercy=5 \
--enable-threads \
--processes=4 \
--master \
# --home=/path/to/virtual/env \ # optional path to a virtualenv
docs:
python -m grip --user-content --wide --export --title="提醒即服务 - Reminder as a Service" WeCron/remind/static/docs/raas.md WeCron/remind/static/docs/raas.html
collectstatic:
python WeCron/manage.py collectstatic --noinput -v0 --clear
clean:
find . -name '*.pyc' -delete
rm -rf WeCron/staticfiles
rm -rf staticfiles
syncdb:
python WeCron/manage.py migrate --noinput
release: test
ansible-playbook deploy/playbook.yml -v
test:
cd WeCron && \
python -Wall manage.py test && \
python manage.py check
test-coverage:
cd WeCron && \
coverage run manage.py test && \
python manage.py check