build(ports): 本地开发改用 7380/7381 避开端口冲突
Some checks failed
Publish container images / Quality checks (push) Has been cancelled
Publish container images / Resolve build version (push) Has been cancelled
Publish container images / Build open-ai-canvas-backend (amd64) (push) Has been cancelled
Publish container images / Build open-ai-canvas-backend (arm64) (push) Has been cancelled
Publish container images / Build open-ai-canvas-web (multi) (push) Has been cancelled
Publish container images / Publish open-ai-canvas-backend manifest (push) Has been cancelled
Publish container images / Publish open-ai-canvas-web manifest (push) Has been cancelled
Publish container images / Publish release assets (push) Has been cancelled

This commit is contained in:
2026-09-21 14:54:20 +08:00
parent c5b81f696c
commit 3c25511f47
10 changed files with 93 additions and 17 deletions

View File

@@ -70,19 +70,19 @@ $dataDirLiteral = ConvertTo-PowerShellLiteral $dataDir
$backendCommand = @"
`$ErrorActionPreference = 'Stop'
Set-Location -LiteralPath $backendDirLiteral
`$env:CANVAS_BACKEND_ADDR = '127.0.0.1:8080'
`$env:CANVAS_BACKEND_ADDR = '127.0.0.1:7381'
`$env:CANVAS_BACKEND_DATA_DIR = $dataDirLiteral
`$env:GOCACHE = $(ConvertTo-PowerShellLiteral $goBuildCache)
`$env:GOMODCACHE = $(ConvertTo-PowerShellLiteral $goModuleCache)
Write-Host '影策后端:http://127.0.0.1:8080' -ForegroundColor Cyan
Write-Host '影策后端:http://127.0.0.1:7381' -ForegroundColor Cyan
go run ./cmd/server
"@
$webCommand = @"
`$ErrorActionPreference = 'Stop'
Set-Location -LiteralPath $webDirLiteral
`$env:VITE_API_PROXY_TARGET = 'http://127.0.0.1:8080'
Write-Host '影策前端:http://localhost:3000' -ForegroundColor Cyan
`$env:VITE_API_PROXY_TARGET = 'http://127.0.0.1:7381'
Write-Host '影策前端:http://localhost:7380' -ForegroundColor Cyan
bun run dev
"@