-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (43 loc) · 1.21 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
52
53
54
55
56
57
58
59
60
61
MANAGE = python3 src/manage.py
PROJECT_DIR = $(shell pwd)
WSGI_PORT=8081
# <---------- RUN ---------->
run:
$(MANAGE) runserver 0.0.0.0:8000
gunicorn_run:
gunicorn -w 1 -b 0.0.0.0:$(WSGI_PORT) --chdir $(PROJECT_DIR)/src core.wsgi --timeout 30 --log-level debug --max-requests 10000
gunicorn_run_8082:
gunicorn -w 1 -b 0.0.0.0:8082 --chdir $(PROJECT_DIR)/src core.wsgi --timeout 30 --log-level debug --max-requests 10000
gunicorn-sock:
gunicorn -w 1 -b unix:/tmp/gunicorn.sock --chdir $(PROJECT_DIR)/src core.wsgi --timeout 30 --log-level debug --max-requests 10000
# <------------------------->
# ---------> Migrations <---------
migrate:
$(MANAGE) migrate
migrations:
$(MANAGE) makemigrations
migrate_acc:
$(MANAGE) makemigrations accounts
migrate_main:
$(MANAGE) makemigrations main
# <------------------------->
# ---------> Nginx <---------
run_nginx:
systemctl start nginx
stop_nginx:
systemctl stop nginx
reload_nginx:
systemctl reload nginx
# <------------------------->
# <------------------------->
collect-static:
$(MANAGE) collectstatic
requirements:
pip install -r requirements.txt
superuser:
$(MANAGE) createsuperuser
app:
$(MANAGE) startapp $(app)
lint:
flake8 .
# <------------------------->