-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (48 loc) · 1.45 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
MAKEFLAGS += -j4
.PHONY: *
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:
docker compose -f local.yml run --rm django coverage run -m pytest -n auto
tasks:
docker compose -f local.yml run --rm django python manage.py totem_tasks
shell:
docker compose -f local.yml run --rm 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:
docker compose -f local.yml run --rm 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:
docker compose -f local.yml run --rm django python manage.py load_dev_data
migrations: ## Create DB migrations in the container
@docker compose -f local.yml run django python manage.py makemigrations
migrate: ## Run DB migrations in the container
@docker compose -f local.yml run django python manage.py migrate
generate_api_models:
@docker compose -f local.yml run --rm --remove-orphans django python manage.py export_openapi_schema --api totem.api.api.api > openapi.json
@npm run openapi-ts
updatedep:
uv sync -U