feat: add .gitignore and apps/template for new apps
This commit is contained in:
18
apps/template/deploy.sh
Executable file
18
apps/template/deploy.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
# 用途:部署 {{APP_NAME}} 到 K3s
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
BASE_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
MANIFESTS="$BASE_DIR/manifests"
|
||||
APP_NAME="{{APP_NAME}}"
|
||||
|
||||
echo "🚀 部署 $APP_NAME..."
|
||||
|
||||
# 依序套用 manifests(按檔名排序)
|
||||
kubectl apply -f "$MANIFESTS/"
|
||||
|
||||
echo "⏳ 等待 Pod 就緒..."
|
||||
kubectl rollout status deployment/$APP_NAME --timeout=120s
|
||||
|
||||
echo "✅ $APP_NAME 部署完成"
|
||||
Reference in New Issue
Block a user