schon/scripts/Windows/reboot.ps1
Egor fureunoir Gorbunov 0a375ad0d1 Features: 1) Add brand_name and category_name fields to ProductDocument for enhanced search indexing; 2) Introduce expanded ICU-based analyzers for multi-language support, including Arabic, Indic, and CJK; 3) Enable search enhancements with revised weights in SMART_FIELDS and additional language-specific query mappings.
Fixes: 1) Correct typo in total_orders field name in ProductDocument; 2) Replace outdated query_lc analyzer with icu_query for consistent Unicode handling; 3) Remove unnecessary get_object_or_404 calls to optimize batch query performance.

Extra: Refactor process_query function with clearer structure and batch-loading logic; streamline brand and category field handling across documents; improve reboot scripts to rebuild search index automatically.
2025-08-20 05:36:55 +03:00

59 lines
1.9 KiB
PowerShell

Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
.\scripts\Windows\starter.ps1
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-Host "Shutting down..." -ForegroundColor Magenta
docker compose down
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-Host "Services were shut down successfully!" -ForegroundColor Green
Write-Host "Spinning services up..." -ForegroundColor Magenta
docker compose up -d --build --wait
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-Host "Services are up and healthy!" -ForegroundColor Green
Write-Host "Applying migrations..." -ForegroundColor Magenta
docker compose exec app poetry run python manage.py migrate --no-input --verbosity 0
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-Host "Migrations applied successfully!" -ForegroundColor Green
Write-Host "Collecting static files..." -ForegroundColor Magenta
docker compose exec app poetry run python manage.py collectstatic --clear --no-input --verbosity 0
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-Host "Static files collected successfully!" -ForegroundColor Green
Write-Host "Setting default caches..." -ForegroundColor Magenta
docker compose exec app poetry run python manage.py set_default_caches
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-Host "Default caches set successfully!" -ForegroundColor Green
Write-Host "Building search Index..." -ForegroundColor Magenta
docker compose exec app poetry run python manage.py search_index --rebuild -f
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-Host "Search Index built successfully!" -ForegroundColor Green
Write-Host "Cleaning up unused Docker data..." -ForegroundColor Magenta
docker system prune -f
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-Host "Unused Docker data cleaned successfully!" -ForegroundColor Green
Write-Host "All done! eVibes is up and running!" -ForegroundColor Cyan