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.
This commit is contained in:
parent
3765fbc0f9
commit
df9e91ad89
1 changed files with 20 additions and 8 deletions
28
manage.sh
28
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
|
||||
;;
|
||||
|
|
|
|||
Loading…
Reference in a new issue