-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (69 loc) · 1.97 KB
/
Makefile
File metadata and controls
79 lines (69 loc) · 1.97 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
.PHONY: help build run stop clean test logs health
# Default target
help:
@echo "Bixor Trading Engine - Development Commands"
@echo ""
@echo "Available commands:"
@echo " build Build all services"
@echo " run Start all services with docker-compose"
@echo " stop Stop all services"
@echo " clean Stop and remove all containers and volumes"
@echo " test Run health checks on all services"
@echo " logs Show logs for all services"
@echo " health Check health of all services"
@echo ""
# Build all services
build:
@echo "Building all services..."
docker-compose build
# Start all services
run:
@echo "Starting all services..."
docker-compose up -d
@echo "Services started. Run 'make health' to check status."
# Stop all services
stop:
@echo "Stopping all services..."
docker-compose down
# Clean everything
clean:
@echo "Cleaning up all containers and volumes..."
docker-compose down -v --remove-orphans
docker system prune -f
# Run health checks
health:
@echo "Checking service health..."
@echo ""
@echo "Go Service Health:"
@curl -s http://localhost:8080/health | jq . || echo "Go service not responding"
@echo ""
@echo "Rust Service Health:"
@curl -s http://localhost:8081/health | jq . || echo "Rust service not responding"
@echo ""
# Show logs
logs:
docker-compose logs -f
# Test endpoints
test:
@echo "Testing all endpoints..."
@echo ""
@echo "=== Go Service ==="
@echo "Health endpoint:"
@curl -s http://localhost:8080/health | jq .
@echo ""
@echo "Status endpoint:"
@curl -s http://localhost:8080/api/v1/status | jq .
@echo ""
@echo "=== Rust Service ==="
@echo "Health endpoint:"
@curl -s http://localhost:8081/health | jq .
@echo ""
@echo "Status endpoint:"
@curl -s http://localhost:8081/api/v1/status | jq .
# Development commands
dev-go:
@echo "Starting Go service in development mode..."
cd go-service && go run main.go
dev-rust:
@echo "Starting Rust service in development mode..."
cd rust-service && cargo run