From a5822f7a5b75b3f5e9e7ff456341b91b9498eaea Mon Sep 17 00:00:00 2001 From: louispaulb Date: Tue, 24 Mar 2026 16:12:07 -0400 Subject: [PATCH] =?UTF-8?q?Add=20deploy-fast.sh=20=E2=80=94=20local=20buil?= =?UTF-8?q?d=20+=20docker=20cp=20(~5s=20vs=20~30s)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No Docker image rebuild needed. Builds PWA locally with npx quasar then copies dist/pwa directly into the ERPNext frontend container. Co-Authored-By: Claude Opus 4.6 (1M context) --- deploy-fast.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 deploy-fast.sh diff --git a/deploy-fast.sh b/deploy-fast.sh new file mode 100755 index 0000000..61e5db3 --- /dev/null +++ b/deploy-fast.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# ───────────────────────────────────────────────────────────────────────────── +# deploy-fast.sh — Build locally + copy to ERPNext container (no Docker build) +# +# ~5-8s vs ~30s with deploy.sh +# +# Usage: +# chmod +x deploy-fast.sh +# ./deploy-fast.sh +# ───────────────────────────────────────────────────────────────────────────── +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +CONTAINER="frappe_docker-frontend-1" +DEST="/home/frappe/frappe-bench/sites/assets/dispatch-app" + +cd "$SCRIPT_DIR" + +echo "==> Building PWA locally..." +npx quasar build -m pwa + +echo "==> Deploying to $CONTAINER..." +docker exec "$CONTAINER" mkdir -p "$DEST" +docker cp "$SCRIPT_DIR/dist/pwa/." "$CONTAINER:$DEST/" + +echo "" +echo "Done! (~$(date +%Ss))" +echo " Dispatch : http://localhost:8080/assets/dispatch-app/index.html" +echo " Mobile : http://localhost:8080/assets/dispatch-app/index.html#/mobile"