-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
83 lines (63 loc) · 1.72 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
75
76
77
78
79
80
81
82
83
DOCKER_COMPOSE_COMMAND = docker-compose -p wms -f build/docker-compose.yml
TEST_LOCAL_DOCKER_COMPOSE_COMMAND = docker-compose -p wms_test -f build/docker-compose.test.local.yml
.PHONY: makemigrations
makemigrations:
$(DOCKER_COMPOSE_COMMAND) exec api ./manage.py makemigrations
.PHONY: makemigrations_empty
makemigrations_empty:
$(DOCKER_COMPOSE_COMMAND) exec api ./manage.py makemigrations --empty
.PHONY: makemigrations_merge
makemigrations_merge:
$(DOCKER_COMPOSE_COMMAND) exec api ./manage.py makemigrations --merge
.PHONY: migrate
migrate:
$(DOCKER_COMPOSE_COMMAND) exec api ./manage.py migrate
.PHONY: celery_purge
celery_purge:
$(DOCKER_COMPOSE_COMMAND) exec api celery -A wms_project purge -f
.PHONY: clean
clean:
$(DOCKER_COMPOSE_COMMAND) down
.PHONY: shell
shell:
$(DOCKER_COMPOSE_COMMAND) exec api ./manage.py shell
.PHONY: bash
bash:
$(DOCKER_COMPOSE_COMMAND) exec api bash
.PHONY: up
up:
$(DOCKER_COMPOSE_COMMAND) up -d
.PHONY: stop
stop:
$(DOCKER_COMPOSE_COMMAND) stop
.PHONY: logs
logs:
$(DOCKER_COMPOSE_COMMAND) logs -f --tail=10
.PHONY: restart
restart:
$(DOCKER_COMPOSE_COMMAND) restart $(APP)
.PHONY: command_script
command_script:
$(DOCKER_COMPOSE_COMMAND) exec api ./manage.py $(SCRIPT)
.PHONY: test
test:
./test.sh -t local $(ARGS)
.PHONY: test_clean
test_clean:
$(TEST_LOCAL_DOCKER_COMPOSE_COMMAND) down
.PHONY: test_up
test_up:
$(TEST_LOCAL_DOCKER_COMPOSE_COMMAND) up -d $(APP)
.PHONY: test_bash
test_bash:
$(TEST_LOCAL_DOCKER_COMPOSE_COMMAND) exec api bash
.PHONY: psql
psql:
$(DOCKER_COMPOSE_COMMAND) exec postgres_db psql -U postgres wms
.PHONY: build
build:
./build.sh -i api -b dev -v "1"
./build.sh -i celery -b dev -v "1"
.PHONY: create_network
create_network:
docker network create wms_shared