Files
jze9 7758315632 feat: initial microservices project structure
Services:
- api: FastAPI gateway with JWT auth, async endpoints, WebSocket
- worker-gpu: CUDA sentence-transformers, FAISS IVFFlat, Ollama LLM
- worker-indexer: Winnowing+MinHash plagiarism detection, PDF/DOCX extraction
- worker-notifier: SMTP email notifications
- worker-gost: GOST 7.1-2003 and GOST R 7.0.5-2008 formatting

Infrastructure:
- docker-compose.yml (production) + docker-compose.dev.yml (hot reload)
- Nginx reverse proxy + WebSocket support
- PostgreSQL 16 with Alembic migrations
- Elasticsearch 8 with Russian/English analyzers
- MinIO, RabbitMQ, Redis, Ollama

Frontend:
- React 18 + Vite + TypeScript + TailwindCSS + Zustand + React Query v5
- 9 pages: Home, Search, Cabinet, Task, Check, Bibliography, Pricing, Login, Register

Scripts:
- Parser stubs: OpenAlex, КиберЛенинка, arXiv (Phase 0 - to be filled)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-24 19:42:39 +05:00

37 lines
1.2 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# Создание ES индекса с маппингом для документов
# Запускать после старта контейнера Elasticsearch
set -e
ES_URL="${ELASTICSEARCH_URL:-http://localhost:9200}"
INDEX_NAME="documents"
MAPPINGS_FILE="$(dirname "$0")/mappings.json"
echo "Ожидание готовности Elasticsearch..."
until curl -s "$ES_URL/_cluster/health" | grep -qv '"status":"red"'; do
sleep 2
done
echo "Elasticsearch готов."
# Проверить существование индекса
if curl -s -o /dev/null -w "%{http_code}" "$ES_URL/$INDEX_NAME" | grep -q "200"; then
echo "Индекс '$INDEX_NAME' уже существует."
read -p "Пересоздать? (y/N): " confirm
if [[ $confirm != "y" ]]; then
echo "Пропускаем."
exit 0
fi
echo "Удаление старого индекса..."
curl -s -X DELETE "$ES_URL/$INDEX_NAME"
echo ""
fi
echo "Создание индекса '$INDEX_NAME'..."
curl -s -X PUT "$ES_URL/$INDEX_NAME" \
-H "Content-Type: application/json" \
-d @"$MAPPINGS_FILE" | python3 -m json.tool
echo ""
echo "Индекс '$INDEX_NAME' создан."