-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
57 lines (45 loc) · 922 Bytes
/
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
APP_PATH = app
TESTS_PATH = tests
LOGS_SINCE = 10m
.PHONY: run
run:
docker-compose up db redis -d
uvicorn $(APP_PATH):app --host 0.0.0.0 --port 8000
.PHONY: up
up:
docker-compose up --build -d
.PHONY: up-prod
up-prod:
docker-compose -f docker-compose.yml -f docker-compose-prod.yml up --build -d
.PHONY: logs
logs:
docker-compose logs --since $(LOGS_SINCE) --follow
.PHONY: stop
stop:
docker-compose stop
.PHONY: restart
restart:
docker-compose restart
.PHONY: format
format:
ruff format $(APP_PATH) $(TESTS_PATH)
.PHONY: lint
lint:
ruff check $(APP_PATH) $(TESTS_PATH) --fix
mypy $(APP_PATH) --install-types
PHONY: generate
generate:
docker-compose up db -d
alembic revision --autogenerate
PHONY: upgrade
upgrade:
docker-compose up db -d
alembic upgrade head
PHONY: downgrade
downgrade:
docker-compose up db -d
alembic downgrade -1
# Windows only
PHONY: kill
kill:
TASKKILL /F /IM python.exe