feat: add .gitignore and apps/template for new apps
This commit is contained in:
15
apps/template/stop.sh
Executable file
15
apps/template/stop.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
# 用途:停止 {{APP_NAME}}(保留資料)
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
APP_NAME="{{APP_NAME}}"
|
||||
|
||||
echo "🛑 停止 $APP_NAME(保留 PVC 資料)..."
|
||||
|
||||
# 只刪除 Deployment 和 Service,PVC 會保留
|
||||
kubectl delete deployment/$APP_NAME --ignore-not-found
|
||||
kubectl delete service/$APP_NAME-service --ignore-not-found
|
||||
kubectl delete ingress/$APP_NAME-ingress --ignore-not-found
|
||||
|
||||
echo "✅ $APP_NAME 已停止,資料安全保留"
|
||||
Reference in New Issue
Block a user