현재 작업 전체 반영
This commit is contained in:
parent
5560638e54
commit
c0dddab594
85 changed files with 11322 additions and 539 deletions
|
|
@ -3,11 +3,13 @@
|
|||
Vignette 로컬 개발 스택(게이트웨이 9099 + API 8000 + 웹 5173)을 정리한다.
|
||||
.DESCRIPTION
|
||||
커맨드라인 기준으로 정확히 종료한다(고아 워커/리로더 포함). scripts/dev-up.ps1 의 짝.
|
||||
기본은 Postgres 컨테이너를 보존한다. 함께 멈추려면 -Db를 명시한다.
|
||||
.EXAMPLE
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\dev-down.ps1
|
||||
#>
|
||||
param(
|
||||
[int]$ApiPort = 8000
|
||||
[int]$ApiPort = 8000,
|
||||
[switch]$Db
|
||||
)
|
||||
$ErrorActionPreference = 'SilentlyContinue'
|
||||
|
||||
|
|
@ -28,5 +30,16 @@ Get-NetTCPConnection -LocalPort $ApiPort -State Listen -ErrorAction SilentlyCont
|
|||
Select-Object -ExpandProperty OwningProcess -Unique |
|
||||
Where-Object { $_ -and $_ -ne 0 } |
|
||||
ForEach-Object { Stop-Process -Id $_ -Force }
|
||||
if ($Db) {
|
||||
if (Get-Command docker -ErrorAction SilentlyContinue) {
|
||||
$running = docker ps --filter name=vignette-dev-db --format '{{.Names}}' 2>$null
|
||||
if ($running -match 'vignette-dev-db') {
|
||||
Write-Host ' stop db vignette-dev-db'
|
||||
docker stop vignette-dev-db 1>$null
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Write-Host ' keep db vignette-dev-db (필요하면 -Db로 중지)'
|
||||
}
|
||||
Start-Sleep -Seconds 1
|
||||
Write-Host "완료."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue