From df9e91ad8962fcd57c1f55e4c96e242aa589650b Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Wed, 13 May 2026 16:12:12 -0700 Subject: [PATCH] chore: standardize cloud commands to hyphen syntax + add update command Closes #1: rename cloud:* subcommands to cloud-* (hyphen is the conventional CLI separator; colon syntax is non-standard). Closes #2: add update (git pull + rebuild) for both local and cloud stacks, covering the common deploy-from-git workflow. --- manage.sh | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/manage.sh b/manage.sh index f278e5d..681ca37 100755 --- a/manage.sh +++ b/manage.sh @@ -12,8 +12,8 @@ OVERRIDE_ARGS=() [[ -f "compose.override.yml" ]] && OVERRIDE_ARGS=(-f compose.override.yml) usage() { - echo "Usage: $0 {start|stop|restart|status|logs [svc]|open|build|test" - echo " |cloud:start|cloud:stop|cloud:restart|cloud:status|cloud:logs [svc]|cloud:build}" + echo "Usage: $0 {start|stop|restart|status|logs [svc]|open|build|test|update" + echo " |cloud-start|cloud-stop|cloud-restart|cloud-status|cloud-logs [svc]|cloud-build|cloud-update}" exit 1 } @@ -48,27 +48,39 @@ case "$cmd" in test) conda run -n cf pytest tests/ -v ;; - cloud:start) + update) + git pull + docker compose -f "$COMPOSE_FILE" "${OVERRIDE_ARGS[@]}" down + docker compose -f "$COMPOSE_FILE" "${OVERRIDE_ARGS[@]}" up -d --build + echo "Pagepiper updated and running → http://localhost:${WEB_PORT}" + ;; + cloud-start) docker compose -f "$COMPOSE_CLOUD_FILE" -p "$CLOUD_PROJECT" up -d --build echo "Pagepiper cloud running → http://localhost:${CLOUD_WEB_PORT}" ;; - cloud:stop) + cloud-stop) docker compose -f "$COMPOSE_CLOUD_FILE" -p "$CLOUD_PROJECT" down ;; - cloud:restart) + cloud-restart) docker compose -f "$COMPOSE_CLOUD_FILE" -p "$CLOUD_PROJECT" down docker compose -f "$COMPOSE_CLOUD_FILE" -p "$CLOUD_PROJECT" up -d --build echo "Pagepiper cloud running → http://localhost:${CLOUD_WEB_PORT}" ;; - cloud:status) + cloud-status) docker compose -f "$COMPOSE_CLOUD_FILE" -p "$CLOUD_PROJECT" ps ;; - cloud:logs) + cloud-logs) docker compose -f "$COMPOSE_CLOUD_FILE" -p "$CLOUD_PROJECT" logs -f "${1:-}" ;; - cloud:build) + cloud-build) docker compose -f "$COMPOSE_CLOUD_FILE" -p "$CLOUD_PROJECT" build --no-cache ;; + cloud-update) + git pull + docker compose -f "$COMPOSE_CLOUD_FILE" -p "$CLOUD_PROJECT" down + docker compose -f "$COMPOSE_CLOUD_FILE" -p "$CLOUD_PROJECT" up -d --build + echo "Pagepiper cloud updated and running → http://localhost:${CLOUD_WEB_PORT}" + ;; *) usage ;;