-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
82 lines (63 loc) · 1.58 KB
/
Makefile
File metadata and controls
82 lines (63 loc) · 1.58 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
service = trajectfi
# to format the codebase
format:
poetry run black .
poetry run ruff check . --fix --select I
# to lint the codebase
lint:
poetry run ruff check .
# isort
isort:
poetry run isort .
# build the project
build:
chmod +x ./build.sh
./build.sh
# start the application
start:
chmod +x ./start.sh
./start.sh
# make database migrations
migrations:
poetry run python manage.py makemigrations
# migrate to database
migrate:
poetry run python manage.py migrate
# run test
test:
poetry run python manage.py test
# start database
database-up:
docker compose up trajectfi_db -d
# top database
database-down:
docker compose down trajectfi_db
# start the application with docker
docker-start:
docker compose up
# build with docker
docker-build:
cp .env.example .env
docker compose build
# run commands in docker container. $(command) specifies the command to be run
docker-run:
docker compose run --rm ${service} $(command)
# make migrations with docker
docker-migrations:
docker compose run --rm ${service} python manage.py makemigrations
# migrate to db with docker
docker-migrate:
docker compose run --rm ${service} python manage.py migrate
# run tests with docker
docker-test:
docker compose run --rm ${service} python manage.py test
# to format the codebase with docker
docker-format:
docker compose run --rm ${service} black .
docker compose run --rm ${service} ruff check . --fix --select I
# to lint the codebase with docker
docker-lint:
docker compose run --rm ${service} ruff check .
# isort with docker
docker-isort:
docker compose run --rm ${service}isort .