diff --git a/.apps_new.stage.json b/.apps_new.stage.json new file mode 100644 index 00000000..397c8d36 --- /dev/null +++ b/.apps_new.stage.json @@ -0,0 +1,18 @@ +[ + { + "url": "https://github.com/frappe/erpnext", + "branch": "version-15" + }, + { + "url": "https://github.com/frappe/hrms", + "branch": "version-15" + }, + { + "url": "https://github.com/frappe/payments", + "branch": "version-15" + }, + { + "url": "https://git.ben-nilsen.com/bnilsen/custom_ui.git", + "branch": "development" + } +] diff --git a/build_new.sh b/build_new.sh index b6bd78a5..92afc149 100755 --- a/build_new.sh +++ b/build_new.sh @@ -1,11 +1,13 @@ #!/bin/bash set -e TAG="" -REMOTE_HOST="erpnext.lasthourhosting.org" -REMOTE_USER="root" +REMOTE_HOST="erp.stage.sprinklersnorthwest.com" +REMOTE_USER="lasthour" MIGRATE=false BUILD_ONLY=false ALREADY_EXISTING=false +PROD_DEPLOYMENT=false +APPS_JSON_FILE="./apps_new.stage.json" while [[ $# -gt 0 ]]; do case "$1" in @@ -22,6 +24,12 @@ while [[ $# -gt 0 ]]; do MIGRATE=true shift 1 ;; + --prod) + PROD_DEPLOYMENT=true + REMOTE_HOST="erp.sprinklersnorthwest.com" + APPS_JSON_FILE="./apps_new.json" + shift 1 + ;; --remote-host) if [[ -z "${2:-}" ]]; then echo "Error: --remote-host requires a value" @@ -63,6 +71,7 @@ while [[ $# -gt 0 ]]; do 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 " --prod Deploy to production server (overrides --remote-host)." 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)." @@ -158,7 +167,7 @@ if [ "$ALREADY_EXISTING" = true ]; then exit 1 fi export TAG -export APPS_JSON_BASE64=$(base64 -w 0 ./apps_new.json) +export APPS_JSON_BASE64=$(base64 -w 0 "$APPS_JSON_FILE") echo "Building Brotherton Frappe Docker Image with tag: $TAG" echo "APPS_JSON_BASE64: $APPS_JSON_BASE64" echo "🚀 Starting Docker build..."