From 404389d95a7c372054dc7597ff62179c46ac1ca8 Mon Sep 17 00:00:00 2001 From: Casey Date: Thu, 8 Jan 2026 07:25:13 -0600 Subject: [PATCH] update deployment script --- build_new.sh | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/build_new.sh b/build_new.sh index 22343568..7fccca79 100755 --- a/build_new.sh +++ b/build_new.sh @@ -41,7 +41,33 @@ while [[ $# -gt 0 ]]; do shift 2 ;; -h|--help) - echo "Usage: $0 [--tag ] [--remote-host ] [--remote-user ]" + echo "Usage: $0 --tag [OPTIONS]" + echo "" + echo "Automated Build & Deploy Script for Brotherton Frappe Docker" + echo "--------------------------------------------------------" + echo "" + echo "description:" + echo " This script orchestrates the full deployment pipeline. It first validates that" + echo " the requested tag does not already exist locally, remotely, or in the registry." + echo " It then builds the Docker image, pushes it to the registry, and triggers the" + echo " remote deployment script." + echo "" + echo "Remote Deployment Actions (executed on server via re-deploy.sh):" + echo " 1. Updates 'frappe-compose.yml' with the new image tag (preserves backup)." + echo " 2. Restarts containers to load the new image." + echo " 3. Runs 'bench migrate' (only if --migrate is passed)." + echo " 4. Compiles assets via 'bench build' and 'bench build-frontend'." + echo " 5. cleanup: Removes old images (Patch Version - 2) to save space." + echo " 6. RECOVERY: If any step fails, it automatically rolls back config and containers." + echo "" + echo "Options:" + echo " --tag REQUIRED. Version tag for the image (e.g., 1.0.0)." + echo " --migrate Run 'bench migrate' on the remote server." + echo " --build-only Build and push only; skip remote deployment checks & action." + echo " --remote-host Target server (Default: $REMOTE_HOST)." + echo " --remote-user SSH User (Default: $REMOTE_USER)." + echo " -h, --help Show this help message." + echo "" exit 0 ;; --build-only)