perf: speed up live Docker staging

This commit is contained in:
Peter Steinberger
2026-04-24 20:03:04 +01:00
parent c9998af44d
commit ed7ea75fc0
6 changed files with 23 additions and 24 deletions

View File

@@ -55,7 +55,9 @@ openclaw_live_stage_source_tree() {
openclaw_live_link_runtime_tree() {
local dest_dir="${1:?destination directory required}"
ln -s /app/node_modules "$dest_dir/node_modules"
if [ ! -e "$dest_dir/node_modules" ]; then
ln -s /app/node_modules "$dest_dir/node_modules"
fi
ln -s /app/dist "$dest_dir/dist"
if [ -d /app/dist-runtime/extensions ]; then
export OPENCLAW_BUNDLED_PLUGINS_DIR=/app/dist-runtime/extensions
@@ -64,6 +66,16 @@ openclaw_live_link_runtime_tree() {
fi
}
openclaw_live_stage_node_modules() {
local dest_dir="${1:?destination directory required}"
local target_dir="$dest_dir/node_modules"
mkdir -p "$target_dir"
find /app/node_modules -mindepth 1 -maxdepth 1 -exec ln -s {} "$target_dir" \;
rm -rf "$target_dir/.vite-temp"
mkdir -p "$target_dir/.vite-temp"
}
openclaw_live_stage_state_dir() {
local dest_dir="${1:?destination directory required}"
local source_dir="${HOME}/.openclaw"