mirror of
https://github.com/iflytek/skillhub.git
synced 2026-09-11 22:51:04 +00:00
feat(ops): add aliyun runtime shortcut
This commit is contained in:
parent
f5c029fbe8
commit
bc4b0dcad1
2 changed files with 13 additions and 3 deletions
|
|
@ -137,11 +137,10 @@ Recommended image tags:
|
|||
- `SKILLHUB_VERSION=edge` for the latest `main` build
|
||||
- `SKILLHUB_VERSION=vX.Y.Z` for a fixed release
|
||||
|
||||
If you maintain a closer registry mirror, start the runtime with:
|
||||
Use the bundled Aliyun mirror shortcut when a nearer registry is configured:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/iflytek/skillhub/main/scripts/runtime.sh | sh -s -- up \
|
||||
--mirror-registry <registry>/<namespace>
|
||||
curl -fsSL https://raw.githubusercontent.com/iflytek/skillhub/main/scripts/runtime.sh | sh -s -- up --aliyun
|
||||
```
|
||||
|
||||
Start the runtime:
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ SKILLHUB_REF="${SKILLHUB_REF:-main}"
|
|||
SKILLHUB_HOME_DEFAULT="${TMPDIR:-/tmp}/skillhub-runtime"
|
||||
SKILLHUB_HOME="${SKILLHUB_HOME:-$SKILLHUB_HOME_DEFAULT}"
|
||||
SKILLHUB_VERSION_VALUE="${SKILLHUB_VERSION:-}"
|
||||
SKILLHUB_ALIYUN_REGISTRY="${SKILLHUB_ALIYUN_REGISTRY:-crpi-ptu2rqimrigtq0qx.cn-hangzhou.personal.cr.aliyuncs.com}"
|
||||
SKILLHUB_ALIYUN_NAMESPACE="${SKILLHUB_ALIYUN_NAMESPACE:-test1245}"
|
||||
SKILLHUB_MIRROR_REGISTRY_VALUE="${SKILLHUB_MIRROR_REGISTRY:-}"
|
||||
SKILLHUB_SERVER_IMAGE_VALUE="${SKILLHUB_SERVER_IMAGE:-}"
|
||||
SKILLHUB_WEB_IMAGE_VALUE="${SKILLHUB_WEB_IMAGE:-}"
|
||||
|
|
@ -25,6 +27,14 @@ while [ "$#" -gt 0 ]; do
|
|||
SKILLHUB_VERSION_VALUE="$2"
|
||||
shift 2
|
||||
;;
|
||||
--aliyun)
|
||||
if [ -z "$SKILLHUB_ALIYUN_REGISTRY" ] || [ -z "$SKILLHUB_ALIYUN_NAMESPACE" ]; then
|
||||
echo "SKILLHUB_ALIYUN_REGISTRY and SKILLHUB_ALIYUN_NAMESPACE must be configured for --aliyun" >&2
|
||||
exit 1
|
||||
fi
|
||||
SKILLHUB_MIRROR_REGISTRY_VALUE="${SKILLHUB_ALIYUN_REGISTRY%/}/${SKILLHUB_ALIYUN_NAMESPACE}"
|
||||
shift
|
||||
;;
|
||||
--mirror-registry)
|
||||
[ "$#" -ge 2 ] || { echo "Missing value for --mirror-registry" >&2; exit 1; }
|
||||
SKILLHUB_MIRROR_REGISTRY_VALUE="$2"
|
||||
|
|
@ -66,6 +76,7 @@ Usage: sh runtime.sh [up|down|clean|ps|logs|pull] [options]
|
|||
|
||||
Options:
|
||||
--version <tag> Use a specific image tag, for example v0.1.0
|
||||
--aliyun Use the configured Aliyun mirror registry
|
||||
--mirror-registry <r> Use mirrored images from <registry>/<namespace>
|
||||
--home <dir> Store runtime files in a specific directory
|
||||
--ref <git-ref> Download runtime files from a specific Git ref
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue