-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (50 loc) · 1.3 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
66
67
68
69
70
71
72
73
74
MAKEFLAGS += -j4
.PHONY: *
RUN_DJANGO = docker compose -f local.yml run --rm --remove-orphans django
run: up assets-watch
up:
docker compose -f local.yml up --remove-orphans
build:
docker compose -f local.yml build
build-prod:
docker build -t totem-prod -f compose/production/django/Dockerfile .
test: test-python test-js
test-js:
npm run test:ci
test-python:
@${RUN_DJANGO} coverage run -m pytest -n auto
tasks:
@${RUN_DJANGO} python manage.py totem_tasks
shell:
@${RUN_DJANGO} bash
dbshell:
docker compose -f local.yml exec postgres bash
sqlshell:
docker compose -f local.yml exec postgres psql -U debug -d totem
pyshell:
@${RUN_DJANGO} ./manage.py shell_plus
deploy:
git push dokku
deploy-prod:
git push dokku-prod
assets-watch:
npm run dev
assets:
npm run build
.venv:
python3 -m venv .venv
install_local: .venv
source .venv/bin/activate && uv sync --frozen
npm install
fixtures:
@${RUN_DJANGO} python manage.py load_dev_data
migrations: ## Create DB migrations in the container
@${RUN_DJANGO} python manage.py makemigrations
migrate: ## Run DB migrations in the container
@${RUN_DJANGO} python manage.py migrate
generate_api_models:
@${RUN_DJANGO} python manage.py export_openapi_schema --api totem.api.api.api > openapi.json
@npm run openapi-ts
updatedep:
uv sync -U
$(MAKE) build