-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
28 lines (21 loc) · 862 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
REPO = einstore
IMAGE = speedster
TAG = 0.0.1
DEBUG_TAG = local-dev
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-13s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
kill: ## Kil all running containers
docker kill $(docker ps -q)
run: ## Run local dev
docker run -p 8080:8080 \
-e DB=postgres \
-e DB_HOST=docker.for.mac.localhost \
$(REPO)/$(IMAGE):$(DEBUG_TAG)
debug: ## Build docker image in debug mode
docker build --build-arg CONFIGURATION="debug" -t $(REPO)/$(IMAGE):$(DEBUG_TAG) .
build: ## Release build
docker build -t $(REPO)/$(IMAGE):$(TAG) .
publish: build ## Publish on docker hub
docker tag $(REPO)/$(IMAGE):$(TAG) $(REPO)/$(IMAGE):latest
docker push $(REPO)/$(IMAGE):$(TAG)
docker push $(REPO)/$(IMAGE):latest