-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (34 loc) · 886 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
DOCKER_FILE=docker-compose.dev.yml
ifeq (shell, $(firstword $(MAKECMDGOALS)))
RUN_ARGS := $(lastword $(MAKECMDGOALS))
$(eval $(RUN_ARGS):;@:)
endif
ifeq (build, $(firstword $(MAKECMDGOALS)))
RUN_ARGS := $(lastword $(MAKECMDGOALS))
$(eval $(RUN_ARGS):;@:)
endif
ifeq (logs, $(firstword $(MAKECMDGOALS)))
RUN_ARGS := $(lastword $(MAKECMDGOALS))
$(eval $(RUN_ARGS):;@:)
endif
.PHONY: up
up:
@docker-compose -f $(DOCKER_FILE) up
.PHONY: up-silent
up-silent:
@docker-compose -f $(DOCKER_FILE) up -d
.PHONY: down
down:
@docker-compose -f $(DOCKER_FILE) down
.PHONY: rebuild
rebuild:
@docker-compose -f $(DOCKER_FILE) up --build
.PHONY: shell
shell:
@docker-compose -f $(DOCKER_FILE) exec $(RUN_ARGS) /bin/bash
.PHONY: build
build:
@docker-compose -f $(DOCKER_FILE) build $(RUN_ARGS)
.PHONY: logs
logs:
@docker-compose -f $(DOCKER_FILE) logs $(RUN_ARGS)