-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
68 lines (47 loc) · 957 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
61
62
63
64
65
66
67
68
compose-file := docker-compose.yml
ifdef COMPOSE_FILE
compose-file := $(COMPOSE_FILE)
endif
cmd = docker-compose -f $(compose-file)
image_tag ?= latest
tag := $(tag)
service := $(word 1,$(MAKECMDGOALS))
.PHONY: fastup
fastup:
export TAG=$(image_tag); docker-compose -f docker-compose-for-fastup.yml up -d --build --remove-orphans
.PHONY: up
up:
$(cmd) up -d --build --remove-orphans
.PHONY: up-no-build
up-no-build:
$(cmd) up -d --remove-orphans
.PHONY: up-tag
up-tag:
export TAG=$(tag); $(cmd) up -d --build --remove-orphans
.PHONY: down
down:
$(cmd) down
.PHONY: build
build:
# build latest
$(cmd) build
git-tag:
git checkout $(tag)
.PHONY: build-tag
build-tag:git-tag
export TAG=$(tag); $(cmd) build
.PHONY: config
config:
$(cmd) config
.PHONY: ps
ps:
$(cmd) ps
.PHONY: logs
logs:
$(cmd) logs -f fastapi_jmx
.PHONY: restart
restart:
$(cmd) restart $(service)
.PHONY: exec
exec:
$(cmd) exec $(service) /bin/bash