-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (43 loc) · 2 KB
/
Makefile
File metadata and controls
59 lines (43 loc) · 2 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
56
57
58
59
# ──────────────────────────────────────────
# Ever Jobs API — Makefile
# ──────────────────────────────────────────
.PHONY: install dev build test lint clean docker-build docker-up docker-dev docker-down logs restart rebuild clean-start help
# ── Development ───────────────────────────
install: ## Install dependencies
npm install
dev: ## Start dev server with hot-reload
npm run start:dev
build: ## Compile TypeScript
npm run build
test: ## Run tests
npx jest --forceExit
lint: ## Lint code
npx eslint "apps/**/*.ts" "packages/**/*.ts"
clean: ## Remove dist and node_modules
rm -rf dist node_modules .nx
# ── Docker ────────────────────────────────
docker-build: ## Build Docker image
docker build -t ever-jobs-api .
docker-up: ## Start production containers
docker compose up -d
docker-dev: ## Start dev containers (hot-reload)
docker compose -f docker-compose.yml -f docker-compose.dev.yml up
docker-down: ## Stop containers
docker compose down
logs: ## Tail container logs
docker compose logs -f ever-jobs-api
restart: ## Restart containers
docker compose restart
rebuild: ## Rebuild & restart containers
docker compose down
docker compose build --no-cache
docker compose up -d
clean-start: ## Full clean rebuild
rm -rf dist node_modules .nx
npm install
npm run build
npm run start
# ── Help ──────────────────────────────────
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-16s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help