@@ -8,8 +8,27 @@ PORT := 3000
88
99# # Show this help message
1010help :
11- @echo " Available commands:"
12- @grep -E ' ^## ' $(MAKEFILE_LIST ) | sed ' s/## //' | awk ' NR%2==1{printf "\033[36m%-15s\033[0m ",$$1} NR%2==0{print}'
11+ @echo " ToolHive Cloud UI - Available Commands"
12+ @echo " "
13+ @echo " Docker (Local Development):"
14+ @echo " make build - Build production Docker image"
15+ @echo " make start - Start Docker container"
16+ @echo " make stop - Stop Docker container"
17+ @echo " make logs - View container logs"
18+ @echo " make clean - Remove container and image"
19+ @echo " make rebuild - Clean and rebuild"
20+ @echo " "
21+ @echo " Kind (Kubernetes):"
22+ @echo " make kind-setup - Create cluster and deploy (first time)"
23+ @echo " make kind-create - Create Kind cluster"
24+ @echo " make kind-deploy - Build and deploy to Kind"
25+ @echo " make kind-port-forward - Port-forward to localhost:8080"
26+ @echo " make kind-logs - View application logs"
27+ @echo " make kind-uninstall - Uninstall from Kind"
28+ @echo " make kind-delete - Delete Kind cluster"
29+ @echo " "
30+ @echo " Development:"
31+ @echo " make dev - Run Next.js dev server"
1332
1433# # Build the production docker image
1534build :
@@ -51,33 +70,52 @@ shell:
5170rebuild : clean build
5271 @echo " Rebuild complete"
5372
54- # # Build image for minikube
55- minikube-build :
56- @echo " Building image for minikube..."
57- @eval $$(minikube docker-env ) && docker build -t $(IMAGE_NAME ) :$(IMAGE_TAG ) .
58- @echo " Image built in minikube Docker daemon"
59-
60- # # Deploy to minikube with Helm
61- minikube-deploy : minikube-build
62- @echo " Deploying to minikube..."
63- @helm upgrade --install toolhive-ui ./helm -f ./helm/values-dev.yaml --wait --timeout=5m
73+ # # Create Kind cluster
74+ kind-create :
75+ @echo " Creating Kind cluster..."
76+ @kind create cluster --name toolhive || echo " Cluster already exists"
77+ @kubectl cluster-info --context kind-toolhive
78+ @echo " Kind cluster ready!"
79+
80+ # # Delete Kind cluster
81+ kind-delete :
82+ @echo " Deleting Kind cluster..."
83+ @kind delete cluster --name toolhive
84+ @echo " Cluster deleted"
85+
86+ # # Build and load image into Kind
87+ kind-build :
88+ @echo " Building Docker image..."
89+ @docker build -t $(IMAGE_NAME ) :$(IMAGE_TAG ) .
90+ @echo " Loading image into Kind cluster..."
91+ @kind load docker-image $(IMAGE_NAME ) :$(IMAGE_TAG ) --name toolhive
92+ @echo " Image loaded successfully"
93+
94+ # # Deploy to Kind with Helm
95+ kind-deploy : kind-build
96+ @echo " Deploying to Kind..."
97+ @helm upgrade --install toolhive-cloud-ui ./helm -f ./helm/values-dev.yaml --wait --timeout=5m
6498 @echo " Deployment complete!"
6599 @echo " "
66100 @echo " To access the application, run:"
67- @echo " make minikube -port-forward"
101+ @echo " make kind -port-forward"
68102 @echo " Then open: http://localhost:8080"
69103
70- # # Uninstall from minikube
71- minikube -uninstall :
72- @helm uninstall toolhive-ui || true
73- @echo " Uninstalled from minikube "
104+ # # Uninstall from Kind
105+ kind -uninstall :
106+ @helm uninstall toolhive-cloud- ui || true
107+ @echo " Uninstalled from Kind "
74108
75- # # View minikube logs
76- minikube -logs :
77- @kubectl logs -f deployment/toolhive-ui-toolhive- cloud-ui
109+ # # View logs
110+ kind -logs :
111+ @kubectl logs -f deployment/toolhive-cloud-ui
78112
79113# # Port-forward to localhost
80- minikube -port-forward :
114+ kind -port-forward :
81115 @echo " Forwarding to http://localhost:8080"
82- @kubectl port-forward svc/toolhive-ui-toolhive-cloud-ui 8080:80
116+ @kubectl port-forward svc/toolhive-cloud-ui 8080:80
117+
118+ # # Full setup: create cluster and deploy
119+ kind-setup : kind-create kind-deploy
120+ @echo " Setup complete!"
83121
0 commit comments