mirror of
https://github.com/wahyd4/hey-search.git
synced 2026-08-08 21:05:14 +10:00
- Add optional Redis caching for search results (REDIS_URL env var) - Cache TTL configurable via UI: 0h (disabled) to 168h (1 week), default 6h - New backend modules: cache.py (async Redis get/set/flush), settings.py (SQLite settings table) - New API endpoints: GET/PUT /api/settings, DELETE /api/cache - New 'Cache' tab in Settings modal with status indicator, preset buttons, slider, and flush - Cache keys are deterministic hashes of query+category+page+image_size+engines - Redis is fully optional: graceful no-op when REDIS_URL unset or Redis unreachable - Updated Dockerfile, README, CHANGELOG, FEATURES Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
50 lines
1.0 KiB
Makefile
50 lines
1.0 KiB
Makefile
# Hey Search — development commands
|
|
|
|
set dotenv-load := false
|
|
|
|
# List available commands
|
|
default:
|
|
@just --list
|
|
|
|
# Install all dependencies
|
|
install:
|
|
cd backend && uv sync
|
|
cd frontend && npm install
|
|
|
|
# Start backend only
|
|
backend:
|
|
cd backend && uv run uvicorn app.main:app --reload --port 8000
|
|
|
|
# Start frontend only
|
|
frontend:
|
|
cd frontend && npm run dev
|
|
|
|
# Start both backend and frontend (Ctrl+C stops everything)
|
|
dev:
|
|
#!/usr/bin/env bash
|
|
set -e
|
|
trap 'echo "Shutting down..."; kill 0; wait' INT TERM
|
|
export REDIS_URL="${REDIS_URL:-}"
|
|
cd backend && uv run uvicorn app.main:app --reload --port 8000 &
|
|
cd frontend && npm run dev &
|
|
wait
|
|
|
|
# Build frontend for production
|
|
build-frontend:
|
|
cd frontend && npm run build
|
|
|
|
# Type-check frontend
|
|
check-frontend:
|
|
cd frontend && npx tsc --noEmit
|
|
|
|
# Build Docker image
|
|
docker-build:
|
|
docker build -t hey-search .
|
|
|
|
# Run Docker image
|
|
docker-run:
|
|
docker run -p 8000:8000 hey-search
|
|
|
|
# Build and run via Docker
|
|
docker: docker-build docker-run
|