-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (30 loc) · 939 Bytes
/
Makefile
File metadata and controls
44 lines (30 loc) · 939 Bytes
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
.PHONY: shell, test, dev, start, build, migrate, shell_plus
PROJECT_NAME=django_atomic_transactions
DOCKER_COMPOSE=docker compose -p ${PROJECT_NAME} -f environment/docker-compose.yml
DOCKER_COMPOSE_RUN_WEB=${DOCKER_COMPOSE} run --rm
default: build
build:
${DOCKER_COMPOSE} build
stop:
${DOCKER_COMPOSE} stop
rm:
${DOCKER_COMPOSE} rm -f
start:
${DOCKER_COMPOSE} up web
dev:
${DOCKER_COMPOSE_RUN_WEB} --service-ports web dev
uvicorn:
${DOCKER_COMPOSE_RUN_WEB} --service-ports web uvicorn
test: build
${DOCKER_COMPOSE_RUN_WEB} web python manage.py test --failfast api
deprecations: build migrate
${DOCKER_COMPOSE_RUN_WEB} web python -Wa manage.py test
shell:
${DOCKER_COMPOSE_RUN_WEB} web ash
shell_plus:
${DOCKER_COMPOSE_RUN_WEB} web python manage.py shell_plus
migrate: build
${DOCKER_COMPOSE_RUN_WEB} web migrate
# This action will erase all previous data
loaddata: migrate
${DOCKER_COMPOSE_RUN_WEB} web loaddata