Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ node_modules/
**/node_modules/
dist/
**/dist/
web-viewer-sample/public/.design-assets-stage-*/
web-viewer-sample/public/.design-assets-backup-*/
web-viewer-sample/public/.design-assets-sync.lock
web-viewer-sample/scripts/test-sync-design-assets-publication.mjs
build/
**/build/
.runtime/
Expand Down
1 change: 1 addition & 0 deletions infra/docker/web-viewer-sample.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ USER node
RUN npm install

COPY --chown=node:node web-viewer-sample/ /workspace/web-viewer-sample/
RUN node scripts/sync-design-assets.mjs

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make viewer Docker builds self-stage assets

When the viewer image is built directly from a clean checkout, e.g. docker compose -f compose.runtime-manager.yml build viewer or CI invoking this Dockerfile without first running the PowerShell deploy adapter, this RUN executes in an image that only copied web-viewer-sample/. The root docs/plans/... sources are not present in the image, and web-viewer-sample/public/design-assets/ is gitignored so it is absent in a clean clone; the sync script therefore falls back to validating a prestaged .deployment-manifest.json and aborts the Docker build. Please either stage the assets inside the Dockerfile without shipping the docs in the final image, or make this build path invoke the same staging step before validation.

Useful? React with 👍 / 👎.


EXPOSE 5173
9 changes: 9 additions & 0 deletions scripts/deploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ $libDir = Join-Path $PSScriptRoot 'lib'
. (Join-Path $libDir 'preflight-volume-alignment.ps1')
. (Join-Path $libDir 'host-native-launcher.ps1')
. (Join-Path $libDir 'kit-log-probe.ps1')
. (Join-Path $libDir 'design-assets.ps1')

if (-not (Test-Path -LiteralPath $RunDir)) {
New-Item -ItemType Directory -Path $RunDir -Force | Out-Null
Expand Down Expand Up @@ -1047,6 +1048,14 @@ if (-not $SkipDocker) {

if ($Build -or -not $hasImages) {
$why = if ($Build) { 'forced by -Build' } else { 'first time (no image found)' }
try {
$designAssetStage = Sync-DeploymentDesignAssets -RepoRoot $RepoRoot
Write-DeployTag -Tag 'ok' -Message "design assets $($designAssetStage.Mode) count=$($designAssetStage.Count)" -LogPath $LogPath | Out-Null
} catch {
Write-DeployTag -Tag 'fail' -Message "design assets staging failed: $($_.Exception.Message)" -LogPath $LogPath | Out-Null
Print-FinalSummary -ExitCode 2 -FailedPhase 'Phase 2 (design assets)'
exit 2
}
Write-DeployTag -Tag 'fix' -Message "docker compose build coordinator viewer ($why) — may take 3-5 min" -LogPath $LogPath | Out-Null
$buildArgs = @('compose','-f','compose.runtime-manager.yml','-f','compose.host-kit.yml','--env-file',$resolvedEnvFile,'build','coordinator','viewer')
Push-Location $RepoRoot
Expand Down
Loading
Loading