Spaces:
Sleeping
Sleeping
| # IntegraChat Docker Helper Commands for PowerShell | |
| # Function to start/restart the container | |
| function Start-IntegraChat { | |
| Write-Host "Starting IntegraChat container..." -ForegroundColor Green | |
| # Check if container exists | |
| $exists = docker ps -a --filter "name=integrachat" --format "{{.Names}}" | |
| if ($exists -eq "integrachat") { | |
| Write-Host "Container exists. Stopping and removing..." -ForegroundColor Yellow | |
| docker stop integrachat 2>$null | |
| docker rm integrachat 2>$null | |
| } | |
| # Run the container | |
| docker run -d --name integrachat ` | |
| -p 7860:7860 ` | |
| -p 8000:8000 ` | |
| -p 8900:8900 ` | |
| -e DOCKER_CONTAINER=1 ` | |
| integrachat:latest | |
| if ($LASTEXITCODE -eq 0) { | |
| Write-Host "`n✅ Container started!" -ForegroundColor Green | |
| Write-Host "`nAccess services:" -ForegroundColor Cyan | |
| Write-Host " • Gradio UI: http://localhost:7860" | |
| Write-Host " • FastAPI: http://localhost:8000" | |
| Write-Host " • MCP Server: http://localhost:8900" | |
| Write-Host "`nView logs: docker logs -f integrachat" -ForegroundColor Yellow | |
| } | |
| } | |
| # Function to stop the container | |
| function Stop-IntegraChat { | |
| Write-Host "Stopping IntegraChat container..." -ForegroundColor Yellow | |
| docker stop integrachat | |
| } | |
| # Function to view logs | |
| function Show-IntegraChatLogs { | |
| docker logs -f integrachat | |
| } | |
| # Function to rebuild | |
| function Rebuild-IntegraChat { | |
| Write-Host "Rebuilding IntegraChat..." -ForegroundColor Green | |
| docker stop integrachat 2>$null | |
| docker rm integrachat 2>$null | |
| docker build -t integrachat:latest . | |
| Start-IntegraChat | |
| } | |
| # Export functions | |
| Export-ModuleMember -Function Start-IntegraChat, Stop-IntegraChat, Show-IntegraChatLogs, Rebuild-IntegraChat | |