-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
65 lines (46 loc) · 1.12 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
62
63
64
65
## Base Makefile ##
# Configuration
config: copy-env setup-env config-mock entrypoint-chmod
copy-env:
cp ./api/.env.example ./api/.env
cp ./web/.env.example ./web/.env.local
setup-env:
bash scripts/env.sh
config-mock:
bash scripts/config.sh
entrypoint-chmod:
chmod +x ./api/config/entrypoint.sh
# Install Dependencies
install:
pip install -r ./api/requirements.txt
npm install --prefix ./web
## Docker ##
start:
sudo docker compose up -d
start-b:
sudo docker compose up --build -d
stop:
sudo docker compose down
stop-v:
sudo docker compose down -v
## Django Shortcuts ##
# Tests
test:
python3 scripts/test.py --clean
testfull:
python3 scripts/test.py
sudo docker exec django-api coverage html
python3 scripts/report.py
cleanup:
sudo rm -f api/.coverage
sudo rm -f -r api/htmlcov
# Migrations
makemigrations:
sudo docker exec django-api python3 manage.py makemigrations
migrate:
sudo docker exec django-api python3 manage.py migrate
# Database Operations
updatedb-all:
sudo docker exec django-api python3 manage.py updatedb -a
deletedb-all:
sudo docker exec django-api python3 manage.py updatedb -d -a