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 = {
|
ScriptBlock = {
|
||||||
Import-Module WebAdministration
|
Import-Module WebAdministration
|
||||||
Stop-WebAppPool -Name $using:AppPoolName -ErrorAction SilentlyContinue
|
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 }
|
if ($UseWinRmHttps) { $invokeParams["UseSSL"] = $true }
|
||||||
@@ -138,10 +140,10 @@ if ($RunEfMigrations) {
|
|||||||
ScriptBlock = {
|
ScriptBlock = {
|
||||||
param($sitePath)
|
param($sitePath)
|
||||||
Set-Location $sitePath
|
Set-Location $sitePath
|
||||||
if (-not (Get-Command dotnet-ef -ErrorAction SilentlyContinue)) {
|
if (-not (Get-Command dotnet ef -ErrorAction SilentlyContinue)) {
|
||||||
throw "dotnet-ef not available on remote host. Install SDK or set `$RunEfMigrations = $false."
|
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)
|
ArgumentList = @($RemoteSitePath)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user