chore: fix local plugin builds & docs (#1851)

Raised by [MitchellThompkins](https://github.com/MitchellThompkins) in
#1848

- Documents how to use Docker to build a local Connect plugin
- Local Plugin flow will now build workspace packages before proceeding
with plugin infra + build
- Removes recommendation to run `pnpm build:watch` from root, as this
race conditions and build cache issues.
- Makes `pnpm dev` from root parallel, preventing servers from blocking
each other.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Updated development workflow documentation to emphasize Docker-based
plugin builds
* Restructured development modes into three workflows: local Docker
builds, direct deployment, and development servers
  * Updated build and deployment instructions

* **Chores**
  * Modified dev script for parallel execution
  * Refactored build scripts with improved dependency handling

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Pujit Mehrotra
2025-12-18 16:33:37 -05:00
committed by GitHub
parent 0e44e73bf7
commit bb9b539732
7 changed files with 70 additions and 75 deletions

View File

@@ -33,6 +33,23 @@ if [ ! -d "$WEB_DIST_DIR" ]; then
mkdir -p "$WEB_DIST_DIR"
fi
# Build dependencies before starting Docker (always rebuild to prevent staleness)
echo "Building dependencies..."
echo "Building API release..."
if ! (cd .. && pnpm --filter @unraid/api build:release); then
echo "Error: API build failed. Aborting."
exit 1
fi
echo "Building web standalone..."
if ! (cd .. && pnpm --filter @unraid/web build); then
echo "Error: Web build failed. Aborting."
exit 1
fi
echo "Dependencies built successfully."
# Stop any running plugin-builder container first
echo "Stopping any running plugin-builder containers..."
docker ps -q --filter "name=${CONTAINER_NAME}" | xargs -r docker stop