forked from docksal/service-vhost-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (39 loc) · 1020 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
-include env_make
VERSION ?= dev
REPO = docksal/vhost-proxy
NAME = docksal-vhost-proxy
.PHONY: build test push shell run start stop logs debug clean release
build:
docker build -t $(REPO):$(VERSION) .
test:
IMAGE=$(REPO):$(VERSION) bats tests/smoke-test.bats
push:
docker push $(REPO):$(VERSION)
exec:
@docker exec $(NAME) $(CMD)
exec-it:
@docker exec -it $(NAME) $(CMD)
shell:
@make exec-it -e CMD=bash
conf-vhosts:
make exec -e CMD='cat /etc/nginx/conf.d/vhosts.conf'
# This is the only place where fin is used/necessary
start:
IMAGE_VHOST_PROXY=$(REPO):$(VERSION) fin system reset vhost-proxy
stop:
docker stop $(NAME)
logs:
docker logs $(NAME)
logs-follow:
docker logs -f $(NAME)
clean:
docker rm -vf $(NAME)
rm -rf projects
debug: build start logs-follow
release: build
make push -e VERSION=$(VERSION)
# Curl command with http2 support via a docker container
# Usage: make curl -e ARGS='-kI https://docksal.io'
curl:
docker run -t --rm badouralix/curl-http2 $(ARGS)
default: build