Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
192 lines (151 loc) · 6.26 KB
/
Copy pathMakefile
File metadata and controls
192 lines (151 loc) · 6.26 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
.PHONY: help init init-www init-dash init-service init-workflow \
dev dev-www dev-dash dev-service \
build build-www build-dash build-service build-workflow \
test test-watch test-e2e \
lint lint-fix format type-check \
db-up db-migrate db-seed db-studio db-generate \
docker-build docker-build-www docker-build-dash docker-build-service docker-build-workflow \
clean
## help: Show available targets
help:
@echo "Usage: make <target>"
@echo ""
@echo "Setup:"
@echo " init Install dependencies and create .env files for all apps"
@echo " init-www Create .env for apps/www"
@echo " init-dash Create .env for apps/dash"
@echo " init-service Create .env for apps/service"
@echo " init-workflow Create .env for apps/workflow"
@echo ""
@echo "Development:"
@echo " dev Run all applications"
@echo " dev-www Run www + service"
@echo " dev-dash Run dash + service"
@echo " dev-service Run service only"
@echo ""
@echo "Build:"
@echo " build Build all applications"
@echo " build-www Build apps/www"
@echo " build-dash Build apps/dash"
@echo " build-service Build apps/service"
@echo " build-workflow Build apps/workflow"
@echo ""
@echo "Testing:"
@echo " test Run unit tests"
@echo " test-watch Run unit tests in watch mode"
@echo " test-e2e Run Playwright end-to-end tests"
@echo ""
@echo "Code Quality:"
@echo " lint Lint all code"
@echo " lint-fix Auto-fix linting issues"
@echo " format Format code with Oxfmt"
@echo " type-check Run TypeScript type checking"
@echo ""
@echo "Database:"
@echo " db-up Start PostgreSQL and Redis with Docker"
@echo " db-migrate Run database migrations"
@echo " db-seed Seed the database"
@echo " db-studio Open Drizzle Studio"
@echo " db-generate Generate Drizzle types"
@echo ""
@echo "Docker:"
@echo " docker-build Build all Docker images"
@echo " docker-build-www Build www Docker image"
@echo " docker-build-dash Build dash Docker image"
@echo " docker-build-service Build service Docker image"
@echo " docker-build-workflow Build workflow Docker image"
@echo ""
@echo " clean Clean all caches and build artifacts"
# ── Setup ────────────────────────────────────────────────────────────────────
init:
@echo "Installing dependencies..."
@pnpm install
@echo "Installing dependencies... Done"
@echo "Creating www .env file..."
@cp ./apps/www/.env.example ./apps/www/.env
@echo "Creating www .env file... Done"
@echo "Creating dash .env file..."
@cp ./apps/dash/.env.example ./apps/dash/.env
@echo "Creating dash .env file... Done"
@echo "Creating service .env file..."
@cp ./apps/service/.env.example ./apps/service/.env
@echo "Creating service .env file... Done"
@echo "Creating workflow .env file..."
@cp ./apps/workflow/.env.example ./apps/workflow/.env
@echo "Creating workflow .env file... Done"
init-www:
@echo "Creating www .env file..."
@cp ./apps/www/.env.example ./apps/www/.env
@echo "Creating www .env file... Done"
init-dash:
@echo "Creating dashboard .env file..."
@cp ./apps/dash/.env.example ./apps/dash/.env
@echo "Creating dashboard .env file... Done"
init-service:
@echo "Creating service .env file..."
@cp ./apps/service/.env.example ./apps/service/.env
@echo "Creating service .env file... Done"
init-workflow:
@echo "Creating workflow .env file..."
@cp ./apps/workflow/.env.example ./apps/workflow/.env
@echo "Creating workflow .env file... Done"
# ── Development ───────────────────────────────────────────────────────────────
dev:
@pnpm dev
dev-www:
@pnpm dev:www
dev-dash:
@pnpm dev:dash
dev-service:
@pnpm dev:service
# ── Build ─────────────────────────────────────────────────────────────────────
build:
@pnpm build
build-www:
@pnpm build:www
build-dash:
@pnpm build:dash
build-service:
@pnpm build:service
build-workflow:
@pnpm build:workflow
# ── Testing ───────────────────────────────────────────────────────────────────
test:
@pnpm test
test-watch:
@pnpm test:watch
test-e2e:
@pnpm test:e2e
# ── Code Quality ──────────────────────────────────────────────────────────────
lint:
@pnpm lint
lint-fix:
@pnpm lint:fix
format:
@pnpm format
type-check:
@pnpm type:check
# ── Database ──────────────────────────────────────────────────────────────────
db-up:
@pnpm db:up
db-migrate:
@pnpm db:migrate
db-seed:
@pnpm db:seed
db-studio:
@pnpm db:studio
db-generate:
@pnpm db:generate
# ── Docker ────────────────────────────────────────────────────────────────────
docker-build-www:
@docker build -f apps/www/Dockerfile -t chia1104-www .
docker-build-dash:
@docker build -f apps/dash/Dockerfile -t chia1104-dash .
docker-build-service:
@docker build -f apps/service/Dockerfile -t chia1104-service .
docker-build-workflow:
@docker build -f apps/workflow/Dockerfile -t chia1104-workflow .
docker-build: docker-build-www docker-build-dash docker-build-service docker-build-workflow
# ── Cleanup ───────────────────────────────────────────────────────────────────
clean:
@pnpm clean:workspaces