-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
36 lines (25 loc) · 1.14 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
USER_ID = $(shell id -u)
GROUP_ID = $(shell id -g)
export UID = $(USER_ID)
export GID = $(GROUP_ID)
DOCKER_COMPOSE_DEV = docker-compose -p reactive-beers
help: ## Display available commands
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
# =====================================================================
# Install =============================================================
# =====================================================================
install: ## Install docker stack
$(DOCKER_COMPOSE_DEV) run --rm node bash -ci 'npm install'
# =====================================================================
# Development =========================================================
# =====================================================================
start: ## Start all the stack
$(DOCKER_COMPOSE_DEV) up -d
setup_node: ## Setup cluster node
./docker/setup.sh
stop: ## Stop all the containers
$(DOCKER_COMPOSE_DEV) down
connect: ## Connect on a remote bash terminal
$(DOCKER_COMPOSE_DEV) exec node bash
log: ## Show logs
$(DOCKER_COMPOSE_DEV) logs -f node