-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
72 lines (59 loc) · 2.45 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
BACKEND_DIR = ../Backend
FRONTEND_DIR = ../Frontend
INSTALLER_DIR = ../Installer
PROTO_DIR = protos
DOCKER_COMPOSE_FILE = ./docker/compose/docker-compose.yml
DOCKER_COMPOSE_PROD_FILE = ./docker/compose/docker-compose-prod.yml
DOCKER_COMPOSE_IPS_FILE = ./docker/compose/docker-compose-ips.yml
ROOT = .
.PHONY: grpc \
frontend-grpc \
installer-grpc \
run check-setup \
build \
stop \
logs \
run-production \
stop-production \
build-production
check-setup:
@echo "🚀 Checking setup..."
@bash scripts/check_setup.sh $(BACKEND_DIR) $(FRONTEND_DIR) $(INSTALLER_DIR)
@echo "✅ Setup is okay!"
grpc: check-setup frontend-grpc installer-grpc
backend-grpc:
@echo "🚀 Generating backend protobuf files ..."
@bash scripts/make_backend_protos.sh $(PROTO_DIR) $(BACKEND_DIR)
@echo "✅ Protobuf backend files generated successfully!"
frontend-grpc:
@echo "🚀 Generating frontend protobuf files ..."
@bash scripts/make_frontend_protos.sh $(PROTO_DIR) $(FRONTEND_DIR)
@echo "✅ Protobuf frontend files generated successfully!"
installer-grpc:
@echo "🚀 Generating installer protobuf files ..."
@bash scripts/make_installer_protos.sh $(PROTO_DIR) $(INSTALLER_DIR)
@echo "✅ Protobuf installer files generated successfully!"
run:
@echo "🚀 Starting Docker services in detached mode..."
@bash scripts/start_honeybrain.sh $(DOCKER_COMPOSE_FILE) $(DOCKER_COMPOSE_IPS_FILE)
@echo "✅ Docker services started successfully!"
run-production:
@echo "🚀 Starting Docker services in production mode..."
@bash scripts/start_honeybrain.sh $(DOCKER_COMPOSE_PROD_FILE) $(DOCKER_COMPOSE_IPS_FILE)
@echo "✅ Docker services started successfully!"
stop-production:
@echo "🚀 Stopping Docker services in production mode..."
@bash scripts/stop_honeybrain.sh $(DOCKER_COMPOSE_PROD_FILE) $(DOCKER_COMPOSE_IPS_FILE)
@echo "✅ Docker services stopped successfully!"
build-production: grpc
@echo "🚀 Starting Docker services with build in production mode..."
@bash scripts/build_honeybrain.sh $(DOCKER_COMPOSE_PROD_FILE) $(DOCKER_COMPOSE_IPS_FILE)
@echo "✅ Docker images built successfully!"
build: grpc
@echo "🚀 Starting Docker services with build..."
@bash scripts/build_honeybrain.sh $(DOCKER_COMPOSE_FILE) $(DOCKER_COMPOSE_IPS_FILE)
@echo "✅ Docker images built successfully!"
stop:
@echo "🚀 Stopping Docker services..."
@bash scripts/stop_honeybrain.sh $(DOCKER_COMPOSE_FILE) $(DOCKER_COMPOSE_IPS_FILE)
@echo "✅ Docker services stopped successfully!"