-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (38 loc) · 994 Bytes
/
Makefile
File metadata and controls
50 lines (38 loc) · 994 Bytes
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
# Makefile for ThinkForge project
.PHONY: build-fe build-server build docker-build clean build-all release clean-release
# 默认目标
all: build
# 构建前端
build-fe:
cd fe && pnpm install && pnpm run build
mkdir -p server/static/fe
cp -r fe/dist/* server/static/fe/
# 构建后端
build-server:
cd server && go mod tidy && go build -o go-rag-server main.go
# 构建整个项目
build: build-fe build-server
# 运行
run:
cd server && ./go-rag-server
# 清理构建产物
clean:
rm -rf fe/dist
rm -rf server/static/fe
rm -f server/go-rag-server
# 构建Docker镜像
docker-build: build
docker build -t ThinkForge:latest -f Dockerfile .
run-local:
cd server && go mod tidy && go run .
build-linux:
cd server && go mod tidy && GOOS=linux GOARCH=amd64 go build -o ThinkForge-server
run-by-docker:
docker compose -f docker-compose.yml up -d
v := v0.0.3
buildx:
docker buildx build \
--platform linux/arm64,linux/amd64 \
-t iwangle/ThinkForge:$(v) \
--push \
.