-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (40 loc) · 2.42 KB
/
Makefile
File metadata and controls
55 lines (40 loc) · 2.42 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
44
45
46
47
48
49
50
51
52
53
54
55
# Executables (local)
DOCKER_COMP = docker compose
# Docker containers
NODE_CONT = $(DOCKER_COMP) exec nuxt
# Executables
NPX = $(NODE_CONT) npx nuxi
NPM = $(NODE_CONT) npm
# Misc
.DEFAULT_GOAL = help
.PHONY : help build up start down logs sh composer vendor sf cc test consolidate install
## —— 🎵 🐳 The Symfony Docker Makefile 🐳 🎵 ——————————————————————————————————
help: ## Outputs this help screen
@grep -E '(^[a-zA-Z0-9\./_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}{printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
## —— Docker 🐳 ————————————————————————————————————————————————————————————————
build: ## Builds the Docker images
@$(DOCKER_COMP) build --pull --no-cache
up: ## Start the docker hub in detached mode (no logs)
@$(DOCKER_COMP) up --detach
install: ## Start the docker hub in detached mode (no logs)
@$(DOCKER_COMP) run --rm --entrypoint bash nuxt -c "npm install"
start: build up ## Build and start the containers
down: ## Stop the docker hub
@$(DOCKER_COMP) down --remove-orphans
logs: ## Show live logs
@$(DOCKER_COMP) logs --tail=0 --follow
sh: ## Connect to the FrankenPHP container
@$(NODE_CONT) sh
bash: ## Connect to the FrankenPHP container via bash so up and down arrows go to previous commands
@$(NODE_CONT) bash
## —— NPM 🧙 ——————————————————————————————————————————————————————————————
npx: ## Run 'npx nuxi', pass the parameter "c=" to run a given command, example: make composer c='prepare'
@$(eval c ?=)
@$(NPX) $(c)
npm: ## Run npm, pass the parameter "c=" to run a given command, example: make composer c='install'
@$(eval c ?=)
@$(NPM) $(c)
## —— AI 🧠 ———————————————————————————————————————————————————————————————
consolidate:
@consolidate --ext=ts,vue,css,json,yaml,Dockerfile,md --exclude=package-lock.json,README.md,'*/.nuxt/*','*/.output/*','*/.data/*','*/docs/*'
@cp ../hskstudykit-backend/docs/api.md api.txt