-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (44 loc) · 1.83 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
COMPOSE_PROJECT ?= "JOCHRE_OCR_TEST"
.PHONY: test start-dep stop-dep
.ONESHELL:
test: start-dep-with-ports-binding
@ cd "${CURDIR}"
JOCHRE3_OCR_DIRECTORY="${CURDIR}" sbt test
start-dep-with-ports-binding:
@ cd "${CURDIR}"
docker-compose -p $(COMPOSE_PROJECT) -f docker-compose/deps.yml build
docker-compose -p $(COMPOSE_PROJECT) -f docker-compose/deps.yml -f docker-compose/bind-ports.yml up -d
init-dev-env: erase-dep-state start-dep-with-ports-binding
@ cd "${CURDIR}"
@sleep 1
start-dep-without-ports-binding:
@ cd "${CURDIR}"
docker-compose -p $(COMPOSE_PROJECT) -f docker-compose/deps.yml up -d
stop-dep:
@ cd "${CURDIR}"
docker-compose -p $(COMPOSE_PROJECT) -f docker-compose/deps.yml -f docker-compose/bind-ports.yml down
erase-dep-state: stop-dep
@ cd "${CURDIR}"
docker-compose -p $(COMPOSE_PROJECT) -f docker-compose/deps.yml -f docker-compose/bind-ports.yml rm
test-ci: erase-dep-state start-dep-without-ports-binding
@ cd "${CURDIR}"
docker-compose -p $(COMPOSE_PROJECT) -f docker-compose/runner.yml build test
docker-compose -p $(COMPOSE_PROJECT) -f docker-compose/runner.yml run -T test
debug-test-ci: erase-dep-state start-dep-without-ports-binding
@ cd "${CURDIR}"
docker-compose -p $(COMPOSE_PROJECT) -f docker-compose/runner.yml run --entrypoint /bin/bash test
simulate-ci:
docker run -v /var/run/docker.sock:/var/run/docker.sock \
-v $(CURDIR):/app:ro \
-w /app \
tiangolo/docker-with-compose:2021-09-18 \
make test-ci
publish-image:
@ cd "${CURDIR}"
COMPOSE_PROJECT=$(COMPOSE_PROJECT) "./publish_jochre_image.sh"
run:
@ cd "${CURDIR}"
JOCHRE3_OCR_DIRECTORY="${CURDIR}" sbt run
clean-docker-compose:
@ cd "${CURDIR}"
docker-compose -p $(COMPOSE_PROJECT) -f docker-compose/deps.yml -f docker-compose/bind-ports.yml -f docker-compose/runner.yml -f docker-compose/jochre.yml down --remove-orphans --rmi local