/
dmukhin
/
SpherePlatform
Обзор
Документация
Войти
/
dmukhin
/
SpherePlatform
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
scripts/clone-supabase-docker.ps1
29 строк
1 KB
OIS\sabogdan
first commit
24 мар 2026, 07:50
24 мар 2026, 07:50
b0e18c7
Код
Авторство
О чём код?
$ErrorActionPreference = "Stop" $Root = Split-Path -Parent (Split-Path -Parent $MyInvocation.MyCommand.Path) $Dest = Join-Path $Root "deploy\supabase\stack" $Compose = Join-Path $Dest "docker-compose.yml" if (Test-Path $Compose) { Write-Host "Already present: $Compose" Write-Host "Remove deploy\supabase\stack contents (keep .gitkeep) to re-fetch." exit 0 } New-Item -ItemType Directory -Force -Path $Dest | Out-Null $Tmp = Join-Path ([System.IO.Path]::GetTempPath()) ("supabase-src-" + [Guid]::NewGuid().ToString("N")) try { git clone --depth 1 --filter=blob:none --sparse https://github.com/supabase/supabase.git $Tmp Push-Location $Tmp try { git sparse-checkout set docker } finally { Pop-Location } Copy-Item -Path (Join-Path $Tmp "docker\*") -Destination $Dest -Recurse -Force Write-Host "Copied official Supabase docker stack to: $Dest" Write-Host "Next: cd $Dest; copy .env.example .env; docker compose up -d" } finally { if (Test-Path $Tmp) { Remove-Item -Recurse -Force $Tmp } }