-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
50 lines (34 loc) · 1.05 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
ARGS = $(filter-out $@,$(MAKECMDGOALS))
MAKEFLAGS += --silent
.PHONY: build re full purge attach stop start
list:
sh -c "echo; $(MAKE) -p no_targets__ | awk -F':' '/^[a-zA-Z0-9][^\$$#\/\\t=]*:([^=]|$$)/ {split(\$$1,A,/ /);for(i in A)print A[i]}' | grep -v '__\$$' | grep -v 'Makefile'| sort"
#############################
# Docker machine states
#############################
start:
docker-compose -f docker-compose.yml start
startstage:
docker-compose -f docker-compose.stage.yml start
stop:
docker-compose stop
stopstage:
docker-compose -f docker-compose.stage.yml stop
state:
docker-compose ps
build:
docker-compose -f docker-compose.yml build
docker-compose -f docker-compose.yml up -d
buildstage:
docker-compose -f docker-compose.stage.yml build
docker-compose -f docker-compose.stage.yml up -d
attach:
docker exec -i -t ${c} /bin/bash
purge:
docker-compose -f docker-compose.yml down
purgestage:
docker-compose -f docker-compose.stage.yml down
re: stop build
restage: stopstage buildstage
full: purge build
fullstage: purgestage buildstage