feat: Go backend, enhanced search, new widgets, Docker deploy
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
This commit is contained in:
86
backend/Makefile
Normal file
86
backend/Makefile
Normal file
@@ -0,0 +1,86 @@
|
||||
.PHONY: all build clean test dev docker-build docker-up
|
||||
|
||||
GO=go
|
||||
GOFLAGS=-ldflags="-s -w"
|
||||
|
||||
SERVICES=api-gateway chat-svc agent-svc search-svc llm-svc scraper-svc discover-svc collection-svc file-svc thread-svc computer-svc
|
||||
|
||||
all: build
|
||||
|
||||
build:
|
||||
@for svc in $(SERVICES); do \
|
||||
echo "Building $$svc..."; \
|
||||
$(GO) build $(GOFLAGS) -o bin/$$svc ./cmd/$$svc; \
|
||||
done
|
||||
|
||||
build-%:
|
||||
$(GO) build $(GOFLAGS) -o bin/$* ./cmd/$*
|
||||
|
||||
clean:
|
||||
rm -rf bin/
|
||||
|
||||
test:
|
||||
$(GO) test -v ./...
|
||||
|
||||
test-coverage:
|
||||
$(GO) test -coverprofile=coverage.out ./...
|
||||
$(GO) tool cover -html=coverage.out -o coverage.html
|
||||
|
||||
lint:
|
||||
golangci-lint run ./...
|
||||
|
||||
dev:
|
||||
@echo "Starting development servers..."
|
||||
@$(GO) run ./cmd/api-gateway &
|
||||
@$(GO) run ./cmd/agent-svc &
|
||||
@$(GO) run ./cmd/search-svc &
|
||||
@wait
|
||||
|
||||
dev-api-gateway:
|
||||
$(GO) run ./cmd/api-gateway
|
||||
|
||||
dev-agent-svc:
|
||||
$(GO) run ./cmd/agent-svc
|
||||
|
||||
dev-chat-svc:
|
||||
$(GO) run ./cmd/chat-svc
|
||||
|
||||
dev-search-svc:
|
||||
$(GO) run ./cmd/search-svc
|
||||
|
||||
docker-build:
|
||||
docker build -t gooseek/api-gateway -f deploy/docker/Dockerfile.api-gateway .
|
||||
docker build -t gooseek/agent-svc -f deploy/docker/Dockerfile.agent-svc .
|
||||
docker build -t gooseek/search-svc -f deploy/docker/Dockerfile.search-svc .
|
||||
|
||||
docker-up:
|
||||
docker-compose -f deploy/docker/docker-compose.yml up -d
|
||||
|
||||
docker-down:
|
||||
docker-compose -f deploy/docker/docker-compose.yml down
|
||||
|
||||
deps:
|
||||
$(GO) mod download
|
||||
$(GO) mod tidy
|
||||
|
||||
generate:
|
||||
$(GO) generate ./...
|
||||
|
||||
# K8s commands
|
||||
k8s-deploy:
|
||||
./deploy/k8s/deploy.sh
|
||||
|
||||
k8s-apply:
|
||||
kubectl apply -k deploy/k8s/
|
||||
|
||||
k8s-delete:
|
||||
kubectl delete -k deploy/k8s/
|
||||
|
||||
k8s-status:
|
||||
kubectl -n gooseek get pods,svc,ingress
|
||||
|
||||
k8s-logs-%:
|
||||
kubectl -n gooseek logs -f deployment/$* --all-containers
|
||||
|
||||
k8s-restart-%:
|
||||
kubectl -n gooseek rollout restart deployment/$*
|
||||
Reference in New Issue
Block a user