-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (30 loc) · 1.43 KB
/
Makefile
File metadata and controls
43 lines (30 loc) · 1.43 KB
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
.DEFAULT_GOAL:=help
COMPOSE_COMMAND := docker compose
DEV_PROFILE := --profile catalog
PROD_PROFILE := --profile production
.PHONY: build test up down nuke restart help
build: ## This builds the images
$(COMPOSE_COMMAND) $(DEV_PROFILE) build
rebuild: ## This builds the images with no-cache
$(COMPOSE_COMMAND) $(DEV_PROFILE) build --no-cache
up: build ## This brings up the app
$(COMPOSE_COMMAND) $(DEV_PROFILE) up
upd: build ## This requests docker daemon to launch the app
$(COMPOSE_COMMAND) $(DEV_PROFILE) up -d
down: ## This takes down the app
$(COMPOSE_COMMAND) $(DEV_PROFILE) down
exec: ## This execs into the running catalog container
$(COMPOSE_COMMAND) $(DEV_PROFILE) exec catalog bash
install: ## This installs necessary yarn dependencies into the catalog container
$(COMPOSE_COMMAND) $(DEV_PROFILE) run catalog yarn install
nuke: ## This removes all the volumes as well as taking down the app
$(COMPOSE_COMMAND) $(DEV_PROFILE) down -v --remove-orphans
restart: down up ## This restarts the app
deploy: ## This deploys prod
$(COMPOSE_COMMAND) $(PROD_PROFILE) up -d
build-prod: ## This builds prod
$(COMPOSE_COMMAND) $(PROD_PROFILE) build
down-prod: ## This takes down prod
$(COMPOSE_COMMAND) $(PROD_PROFILE) down
help: ## This is the help dialog
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-10s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)