-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (50 loc) · 1.52 KB
/
Makefile
File metadata and controls
67 lines (50 loc) · 1.52 KB
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
62
63
64
65
66
SHELL := /bin/bash
.PHONY: install
install: cpsecret venv dependencies migrate node_modules
.PHONY: production
production: cpsecret venv prod-dependencies prod-configure prod-collectstatic
.PHONY: cpsecret
cpsecret:
[ ! -e "django/config/settings/secrets.json" ] && \
cp django/config/settings/secrets.json.example django/config/settings/secrets.json
.PHONY: venv
venv:
cd django && [ ! -e "venv/bin/activate_this.py" ] && virtualenv --clear venv
.PHONY: dependencies
dependencies:
cd django && venv/bin/pip install -r requirements/local.txt
.PHONY: prod-dependencies
prod-dependencies:
cd django && venv/bin/pip install -r requirements/production.txt
.PHONY: node_modules
node_modules:
cd frontend && yarn install
.PHONY: migrate
migrate:
cd django && venv/bin/python manage.py migrate --settings=config.settings.local
.PHONY: prod-configure
prod-configure:
bash scripts/deployment/setup.sh
.PHONY: prod-collectstatic
prod-collectstatic:
cd django && venv/bin/python manage.py collectstatic \
--settings=config.settings.production --noinput
.PHONY: prod-migrate
prod-migrate:
cd django && venv/bin/python manage.py migrate \
--settings=config.settings.production
.PHONY: freeze
freeze:
cd django && venv/bin/pip freeze > requirements/constraints.txt
.PHONY: clean
clean: clear_files clear_venv clear_modules
.PHONY: clear_files
clear_files:
find . -name '*.pyc' -delete
find . -name '__pycache__' -delete
.PHONY: clear_venv
clear_venv:
rm -rf django/venv
.PHONY: clear_modules
clear_modules:
rm -rf frontend/node_modules