Schema cleanup:
- Remove anubis_ua_rules table stub from 03_anubis_tables.sql
- Remove anubis_ua_rules from bot-detector deploy_schema.sql
- Remove UA seed step from clickhouse-init.sh (no more REGEXP_TREE dependency)
- Drop dict_anubis_ua, dict_anubis_country, anubis_ua_rules, anubis_country_rules
New scripts:
- scripts/init-stack.sh: comprehensive ClickHouse init (13 SQL files + migrations
+ validation + cleanup of obsolete tables). Supports --reset, --import-prod.
- scripts/import-prod-data.sh: imports pre-exported prod data (Native format)
with dynamic date shift (max(time) → now). Supports --shift, --no-truncate.
- scripts/data/prod-export/: directory for cached Native format exports
Makefile targets: init-stack, import-prod-data, init-and-import
Tested: init-stack.sh passes all 13 SQL + 7 critical tables + 7 dicts
import-prod-data.sh: 3M rows in ~37s with auto date shift
Dashboard: 55 routes OK, bot-detector: 36/36 tests pass
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
39 lines
428 B
Plaintext
39 lines
428 B
Plaintext
# Secrets — never commit
|
|
.env
|
|
.env.*
|
|
!.env.example
|
|
*.env
|
|
|
|
# Python
|
|
__pycache__/
|
|
*.pyc
|
|
*.pyo
|
|
.pytest_cache/
|
|
*.egg-info/
|
|
dist/
|
|
build/
|
|
.coverage
|
|
coverage.xml
|
|
htmlcov/
|
|
|
|
# Go
|
|
*.test
|
|
coverage.out
|
|
coverage.html
|
|
|
|
# Node
|
|
node_modules/
|
|
frontend/dist/
|
|
|
|
# Models and logs (runtime artifacts)
|
|
bot_detector_models/
|
|
bot_detector_logs/
|
|
|
|
# IDE
|
|
.vscode/
|
|
.idea/
|
|
*.swp
|
|
|
|
# Exported prod data (large binary files)
|
|
scripts/data/prod-export/*.native
|