forked from PaddleHQ/microservice-mocking-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (24 loc) · 917 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
DOCKER_COMPOSE_FILES = -f docker-compose.yml
ifeq ($(WITH_MOCKS), true)
DOCKER_COMPOSE_FILES += -f docker-compose.mocks.yml
endif
DOCKER_COMPOSE=docker-compose $(DOCKER_COMPOSE_FILES)
build: ## Build the docker containers
docker build -t paddle-examples/mocks-nginx -f docker/nginx/Dockerfile .
docker build -t paddle-examples/mocks-php -f docker/php/Dockerfile .
docker build -t paddle-examples/mocks-mountebank -f docker/mountebank/Dockerfile .
start:
$(DOCKER_COMPOSE) up -d
stop:
$(DOCKER_COMPOSE) stop
start-with-mocks: ## start service with mocking enabled
WITH_MOCKS=true make start
start-without-mocks: ## start service without mocking
WITH_MOCKS=false make start
.SILENT: help
help: ## Show this help message
set -x
echo "Usage: make [target] ..."
echo ""
echo "Available targets:"
grep ':.* ##\ ' ${MAKEFILE_LIST} | awk '{gsub(":[^#]*##","\t"); print}' | column -t -c 2 -s $$'\t' | sort