-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
84 lines (69 loc) · 2.65 KB
/
Makefile
File metadata and controls
84 lines (69 loc) · 2.65 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
80
81
82
83
84
# Ravitools Makefile
# Usage: make <target>
.PHONY: help install client client-build client-start client-stop server server-build server-start server-stop searxng searxng-stop all stop
help:
@echo "Ravitools targets:"
@echo " make install - Install all dependencies"
@echo " make client - Start frontend dev server (Vite)"
@echo " make client-build - Build frontend for production"
@echo " make client-start - Start frontend preview (production build)"
@echo " make server - Start backend dev server"
@echo " make server-build - Build backend for production"
@echo " make server-start - Start backend from production build"
@echo " make searxng - Start SearXNG (Docker)"
@echo " make all - Start searxng + server + client"
install:
cd web/client && npm install && cd web/client && npm audit fix --force
cd web/server && npm install && cd web/server && npm audit fix --force
# Client (frontend)
client:
cd web/client && npm run dev
client-build:
cd web/client && npm run build
client-start:
cd web/client && npm run preview
# Server (backend)
server:
cd web/server && npm run dev
server-build:
cd web/server && npm run build
server-start:
cd web/server && npm start
server-stop:
@lsof -ti:3001 | xargs kill -9 2>/dev/null && echo "Server stopped" || echo "Server not running"
# Client
client-stop:
@lsof -ti:5173 | xargs kill -9 2>/dev/null && echo "Client stopped" || echo "Client not running"
# SearXNG (search engine)
searxng:
@if docker info >/dev/null 2>&1; then \
docker rm -f searxng >/dev/null 2>&1 || true; \
docker run -d -p 8888:8080 --rm --name searxng \
-v "$(CURDIR)/searxng/settings.yml:/etc/searxng/settings.yml:ro" \
-v "$(CURDIR)/searxng/limiter.toml:/etc/searxng/limiter.toml:ro" \
-e SEARXNG_BASE_URL=http://localhost:8888 \
searxng/searxng; \
echo "SearXNG started on http://localhost:8888 (JSON API enabled, limiter off)"; \
else \
echo "Docker not running. Please start Docker Desktop and retry 'make searxng'"; \
fi
# Stop SearXNG
searxng-stop:
docker rm -f searxng >/dev/null 2>&1 && echo "SearXNG stopped" || echo "SearXNG not running"
# All services
all: searxng
@echo ""
@echo "All services ready:"
@echo " - Client: http://localhost:5173"
@echo " - Server: http://localhost:3001"
@echo " - SearXNG: http://localhost:8888 (optional, for enrichment)"
@echo ""
@echo "Now run in separate terminals:"
@echo " make client"
@echo " make server"
@echo " (or run make server & make client in background)"
# Stop all services
stop: searxng-stop
-@lsof -ti:3001 | xargs kill -9 2>/dev/null
-@lsof -ti:5173 | xargs kill -9 2>/dev/null
@echo "Stopped server (3001) and client (5173)"