-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
50 lines (35 loc) · 1.26 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
.PHONY: build shell test all presentation start clean backup prepare
WEB_SRV_NAME = app_devbox_1
all: build test
build: prepare
docker-compose -p app build
mkdir -p ~/.x2goclient
cp -f configs/sessions ~/.x2goclient/
start:
mkdir -p ~/work/mavenRepo/docker
docker-compose -p app up -d
shell:
docker exec -ti app_devbox_1 bash -l
gui: start
/Applications/x2goclient.app/Contents/MacOS/x2goclient \
--session=devbox
presentation:
@docker kill $(WEB_SRV_NAME) >/dev/null || :
@docker rm $(WEB_SRV_NAME) >/dev/null || :
@docker run -d --name $(WEB_SRV_NAME) -v $(CURDIR)/slides:/www -p 80:80 fnichol/uhttpd >/dev/null
@echo http://$$(boot2docker ip 2>/dev/null):80
test:
docker run \
-v $(CURDIR):/app \
-v $$(which docker):$$(which docker) \
-v /var/run/docker.sock:/var/run/docker.sock \
-e DOCKER_HOST=unix:///var/run/docker.sock \
dduportal/bats:0.4.0 \
/app/tests/bats/
backup:
docker-compose -p app run devbox tar czf /tmp/bkp-data-latest.tgz /data/
clean:
docker-compose -p app kill
docker-compose -p app rm -f -v
prepare:
if [ "$$CIRCLECI" = "true" ]; then curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m` > /home/ubuntu/bin/docker-compose && chmod +x /home/ubuntu/bin/docker-compose;fi