-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (46 loc) · 1.21 KB
/
Makefile
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
.PHONY: dev-deps dev dev-core dev-peer dev-client stop clean install-tools
# Default target
all: dev
# Install development tools
install-tools:
@echo "Installing development tools..."
go install github.com/air-verse/air@latest
# Install dependencies
dev-deps: install-tools
cd core-cp && go mod download
cd peer-cp && go mod download
cd client-cp && pnpm install
# Start infrastructure (Nginx and Postgres)
infra:
docker-compose -f compose.dev.yaml up -d
# Start all development services
dev: infra
make -j3 dev-core dev-peer dev-client
# Start core service with hot reload
dev-core:
@echo "Starting core service..."
cd core-cp && air
# Start peer service with hot reload
dev-peer:
@echo "Starting peer service..."
cd peer-cp && air
# Start client
dev-client:
@echo "Starting client..."
cd client-cp && pnpm dev
# Stop infrastructure
stop:
docker-compose -f compose.dev.yaml down
# Clean up
clean: stop
cd client-cp && rm -rf node_modules
cd core-cp && rm -rf tmp
cd peer-cp && rm -rf tmp
docker-compose -f compose.dev.yaml down -v
# Show logs
logs:
docker-compose -f compose.dev.yaml logs -f
# Initial setup
setup: dev-deps
@echo "Setting up development environment..."
docker-compose -f compose.dev.yaml pull