feat: add .gitignore and apps/template for new apps

This commit is contained in:
2026-04-01 16:32:59 +08:00
parent 98cd6b71cb
commit 19342c6821
10 changed files with 292 additions and 0 deletions

18
apps/template/deploy.sh Executable file
View 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 部署完成"