-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
79 lines (60 loc) · 1.53 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
help:
@echo '**SBCatalog Help**'
@echo 'make Print this help'
@echo
@echo 'Whole app commands:'
@echo 'make up Download and start all'
@echo 'make ps Container status'
@echo 'make logs See all logs'
@echo 'make stop Stop all containers'
@echo 'make restart Restart all containers'
@echo 'make rm Delete containers'
@echo 'make test Run all tests'
@echo
@echo 'Container commands:'
@echo 'make logs-back See only backend logs'
@echo 'make back Debug in backend via iPython'
up:
@docker-compose up -d
@docker-compose ps
logs log:
@docker-compose logs
logs-back log-back:
@docker-compose logs back
start:
@docker-compose start
@docker-compose ps
stop:
@docker-compose stop
@docker-compose ps
restart:
@docker-compose restart
@docker-compose ps
ps:
@docker-compose ps
t:
@docker-compose run --rm test /bin/bash
front fe frontend ui:
@docker-compose run --rm front /bin/bash
back be backend api:
@docker-compose run --rm back /bin/bash
shell:
@docker-compose run --rm back ipython
update-geodb:
@docker-compose run --rm back /code/api/run.py update-geodb
rmall: rm rmc rmi
@echo 'All containers/images removed!'
rm:
@docker-compose stop
@docker-compose rm -f
@docker rmi -f befair/sbcatalog-{test,front,back}
rmc:
@docker rm -f $(docker ps -aq)
rmi:
@docker rmi -f $(docker images -aq)
test: test-unit test-integration
@echo 'All tests passed!'
test-unit:
@echo 'TODO: unit test'
test-integration:
@docker-compose run test py.test /code/test/integration