mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
Docker: include A2UI sources for bundle (#13114)
* Docker: include A2UI sources for bundle * Build: fail bundling when sources missing and no prebuilt A2UI bundle
This commit is contained in:
@@ -46,3 +46,15 @@ Swabble/
|
|||||||
Core/
|
Core/
|
||||||
Users/
|
Users/
|
||||||
vendor/
|
vendor/
|
||||||
|
|
||||||
|
# Needed for building the Canvas A2UI bundle during Docker image builds.
|
||||||
|
# Keep the rest of apps/ and vendor/ excluded to avoid a large build context.
|
||||||
|
!apps/shared/
|
||||||
|
!apps/shared/OpenClawKit/
|
||||||
|
!apps/shared/OpenClawKit/Tools/
|
||||||
|
!apps/shared/OpenClawKit/Tools/CanvasA2UI/
|
||||||
|
!apps/shared/OpenClawKit/Tools/CanvasA2UI/**
|
||||||
|
!vendor/a2ui/
|
||||||
|
!vendor/a2ui/renderers/
|
||||||
|
!vendor/a2ui/renderers/lit/
|
||||||
|
!vendor/a2ui/renderers/lit/**
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ COPY scripts ./scripts
|
|||||||
RUN pnpm install --frozen-lockfile
|
RUN pnpm install --frozen-lockfile
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN OPENCLAW_A2UI_SKIP_MISSING=1 pnpm build
|
RUN pnpm build
|
||||||
# Force pnpm for UI build (Bun may fail on ARM/Synology architectures)
|
# Force pnpm for UI build (Bun may fail on ARM/Synology architectures)
|
||||||
ENV OPENCLAW_PREFER_PNPM=1
|
ENV OPENCLAW_PREFER_PNPM=1
|
||||||
RUN pnpm ui:build
|
RUN pnpm ui:build
|
||||||
|
|||||||
@@ -14,10 +14,14 @@ A2UI_RENDERER_DIR="$ROOT_DIR/vendor/a2ui/renderers/lit"
|
|||||||
A2UI_APP_DIR="$ROOT_DIR/apps/shared/OpenClawKit/Tools/CanvasA2UI"
|
A2UI_APP_DIR="$ROOT_DIR/apps/shared/OpenClawKit/Tools/CanvasA2UI"
|
||||||
|
|
||||||
# Docker builds exclude vendor/apps via .dockerignore.
|
# Docker builds exclude vendor/apps via .dockerignore.
|
||||||
# In that environment we must keep the prebuilt bundle.
|
# In that environment we can keep a prebuilt bundle only if it exists.
|
||||||
if [[ ! -d "$A2UI_RENDERER_DIR" || ! -d "$A2UI_APP_DIR" ]]; then
|
if [[ ! -d "$A2UI_RENDERER_DIR" || ! -d "$A2UI_APP_DIR" ]]; then
|
||||||
echo "A2UI sources missing; keeping prebuilt bundle."
|
if [[ -f "$OUTPUT_FILE" ]]; then
|
||||||
exit 0
|
echo "A2UI sources missing; keeping prebuilt bundle."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "A2UI sources missing and no prebuilt bundle found at: $OUTPUT_FILE" >&2
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
INPUT_PATHS=(
|
INPUT_PATHS=(
|
||||||
|
|||||||
Reference in New Issue
Block a user