mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-20 21:43:18 +00:00
39 lines
1.5 KiB
PowerShell
39 lines
1.5 KiB
PowerShell
|
# Script to start the docker continers used for the HIRS Acceptance Test
|
||
|
|
||
|
$DockerProc = Get-process "*docker desktop*"
|
||
|
if ($DockerProc.Count -eq 0 ) {
|
||
|
Write-Host "Docker Service is not started, please start Docker Desktop."
|
||
|
Write-Host "Exiting without starting HAT. Hit any key to exit"
|
||
|
$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
|
||
|
exit
|
||
|
}
|
||
|
|
||
|
$IsAcaRunning = docker container inspect -f '{{.State.Running}}' aca 2>&1
|
||
|
$IsHatRunning = docker container inspect -f '{{.State.Running}}' hat 2>&1
|
||
|
|
||
|
if ($IsHatRunning -eq $TRUE) {
|
||
|
Write-Host "HAT container is already running"
|
||
|
}
|
||
|
|
||
|
if ($IsAcaRunning -eq $TRUE) {
|
||
|
Write-Host "ACA container is already running"
|
||
|
}
|
||
|
|
||
|
if ( ($IsHatRunning -eq $TRUE) -and ($IsAcaRunning -eq $TRUE) ) {
|
||
|
Write-Host "ACA and Hat container are already started, exiting"
|
||
|
Write-Host "You can check container status in the Docker Desktop."
|
||
|
Write-Host "Use the following URL in your Browser to view the ACA Portal: https://localhost:8443"
|
||
|
Write-Host "Hit any key to exit"
|
||
|
$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
|
||
|
exit
|
||
|
} else {
|
||
|
Write-Host "Starting ACA and HAT containers..."
|
||
|
docker compose -f $Home\hirs\compose-acceptance-test-windows.yml up --detach
|
||
|
}
|
||
|
|
||
|
Write-Host "HIRS Acceptance Test Servers Have been started."
|
||
|
Write-Host "You can check container status in the Docker Desktop."
|
||
|
Write-Host "Use the following URL in your Browser to view the ACA Portal: https://localhost:8443"
|
||
|
Write-Host "Hit any key"
|
||
|
$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
|
||
|
exit;
|