-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (47 loc) · 1009 Bytes
/
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
show-current-target = @echo; echo "======= $@ ========"
.PHONY: all
all:
compose = docker compose $(COMPOSE_ARGS)
compose-run = $(compose) run --rm
compose-exec = $(compose) exec -T
compose-cp = docker compose cp
wiki-exec = $(compose-exec) wiki
# ======== Build ========
.PHONY: build
build:
docker build \
--tag ghcr.io/gesinn-it-pub/openresearch-stack:dev \
./context
# ======== Run ========
.PHONY: up
up:
$(show-current-target)
$(compose) up -d
.PHONY: wait-for-wiki
wait-for-wiki:
$(show-current-target)
$(compose-run) wait-for-wiki
.PHONY: show-status
show-status:
$(show-current-target)
$(compose) ps
.PHONY: show-logs
show-logs:
docker compose logs -f || exit 0
.PHONY: stop
stop:
$(show-current-target)
$(compose) stop
.PHONY: down
down:
$(show-current-target)
$(compose) down
.PHONY: destroy
destroy:
$(show-current-target)
$(compose) down --volumes --remove-orphans
# ======== Develop ========
.PHONY: bash
bash:
$(show-current-target)
$(compose) exec wiki bash