Kill stale site processes and enable remote migrations by default in deploy script
This commit is contained in:
@@ -81,6 +81,8 @@ if ($RecycleAppPool) {
|
||||
ScriptBlock = {
|
||||
Import-Module WebAdministration
|
||||
Stop-WebAppPool -Name $using:AppPoolName -ErrorAction SilentlyContinue
|
||||
Get-Process GameList -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
|
||||
Get-Process dotnet -ErrorAction SilentlyContinue | Where-Object { $_.Path -like "*picknplay*" } | Stop-Process -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
}
|
||||
if ($UseWinRmHttps) { $invokeParams["UseSSL"] = $true }
|
||||
@@ -138,10 +140,10 @@ if ($RunEfMigrations) {
|
||||
ScriptBlock = {
|
||||
param($sitePath)
|
||||
Set-Location $sitePath
|
||||
if (-not (Get-Command dotnet-ef -ErrorAction SilentlyContinue)) {
|
||||
throw "dotnet-ef not available on remote host. Install SDK or set `$RunEfMigrations = $false."
|
||||
if (-not (Get-Command dotnet ef -ErrorAction SilentlyContinue)) {
|
||||
throw "dotnet ef not available on remote host. Install SDK or set `$RunEfMigrations = $false."
|
||||
}
|
||||
dotnet-ef database update --no-build
|
||||
dotnet ef database update --no-build
|
||||
}
|
||||
ArgumentList = @($RemoteSitePath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user