Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

19 linhas
900B

  1. <#
  2. .SYNOPSIS Start the Knowledge Engine containers and wait for PostgreSQL to be healthy.
  3. #>
  4. [CmdletBinding()]
  5. param([switch]$WithOllamaContainer, [int]$TimeoutSeconds = 90)
  6. $ErrorActionPreference = 'Stop'
  7. $root = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path
  8. $composeArgs = @('compose', '-f', (Join-Path $root 'docker-compose.yml'))
  9. if ($WithOllamaContainer) { $composeArgs += @('--profile', 'ollama-container') }
  10. & docker @composeArgs up -d
  11. if ($LASTEXITCODE -ne 0) { throw 'docker compose up failed.' }
  12. $deadline = [DateTime]::UtcNow.AddSeconds($TimeoutSeconds)
  13. do {
  14. $h = (& docker inspect -f '{{.State.Health.Status}}' foundry-postgres 2>$null)
  15. if ($h -eq 'healthy') { Write-Host 'foundry-postgres is healthy.'; return }
  16. Start-Sleep -Seconds 2
  17. } while ([DateTime]::UtcNow -lt $deadline)
  18. throw "foundry-postgres did not become healthy within $TimeoutSeconds s (last status: $h)."

Powered by TurnKey Linux.