Major changes: - Add Go backend (backend/) with microservices architecture - Enhanced master-agents-svc: reranker, content-classifier, stealth-crawler, proxy-manager, media-search, fastClassifier, language detection - New web-svc widgets: KnowledgeCard, ProductCard, ProfileCard, VideoCard, UnifiedCard, CardGallery, InlineImageGallery, SourcesPanel, RelatedQuestions - Improved discover-svc with discover-db integration - Docker deployment improvements (Caddyfile, vendor.sh, BUILD.md) - Library-svc: project_id schema migration - Remove deprecated finance-svc and travel-svc - Localization improvements across services Made-with: Cursor
57 lines
1.5 KiB
Bash
Executable File
57 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
BACKEND_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
|
|
echo "=== GooSeek Go Backend K8s Deployment ==="
|
|
echo "Backend dir: $BACKEND_DIR"
|
|
|
|
# Check kubectl
|
|
if ! command -v kubectl &> /dev/null; then
|
|
echo "Error: kubectl not found"
|
|
exit 1
|
|
fi
|
|
|
|
# Build Docker image
|
|
echo ""
|
|
echo "=== Building Docker image ==="
|
|
cd "$BACKEND_DIR"
|
|
docker build -f deploy/docker/Dockerfile.all -t gooseek/backend:latest .
|
|
|
|
# Load to k3s (if using k3s)
|
|
if command -v k3s &> /dev/null; then
|
|
echo ""
|
|
echo "=== Loading image to k3s ==="
|
|
docker save gooseek/backend:latest | sudo k3s ctr images import -
|
|
fi
|
|
|
|
# Apply kustomization
|
|
echo ""
|
|
echo "=== Applying K8s manifests ==="
|
|
cd "$SCRIPT_DIR"
|
|
kubectl apply -k .
|
|
|
|
# Wait for rollout
|
|
echo ""
|
|
echo "=== Waiting for deployments ==="
|
|
kubectl -n gooseek rollout status deployment/api-gateway --timeout=120s || true
|
|
kubectl -n gooseek rollout status deployment/chat-svc --timeout=120s || true
|
|
kubectl -n gooseek rollout status deployment/agent-svc --timeout=120s || true
|
|
kubectl -n gooseek rollout status deployment/discover-svc --timeout=120s || true
|
|
kubectl -n gooseek rollout status deployment/search-svc --timeout=120s || true
|
|
kubectl -n gooseek rollout status deployment/redis --timeout=60s || true
|
|
|
|
# Show status
|
|
echo ""
|
|
echo "=== Deployment Status ==="
|
|
kubectl -n gooseek get pods
|
|
echo ""
|
|
kubectl -n gooseek get svc
|
|
echo ""
|
|
kubectl -n gooseek get ingress
|
|
|
|
echo ""
|
|
echo "=== Done ==="
|
|
echo "API Gateway: http://localhost:3015 (NodePort) or via Ingress"
|