Files
violin-home/authentik-deploy/install.sh
T
simple321vip 4da6832b44 feat: R1 重构对称迁移 + 升级依赖 + 配置文件分离
- 命名重构:tenant → customer(对齐后端 R1 重构)
  - Tenant → Customer / tenant_id → customerId
  - tenantStore → customerStore / getTenant/setTenant → getCustomer/setCustomer
  - cookie key tenant → customer, HTTP header tenantId → customerId
- 后端契约更新:AuthResponse 加 sub 字段
- 接口 URL 修复:/auth/oidc/callback → /api/v1/auth/oidc/callback
- 依赖升级:vue 3.5 / element-plus 2.8 / vite 5 / typescript 5.6 / sass 1.79
- 删 node-sass / scss / sass-loader / moment / mock/index.ts
- 配置文件拆分:.env.development / .env.production / .env.example
- 删除冗余 view/auth/auth/callback.vue 副本
- .gitignore 增加 dist / .opencode / tmp
- 新增 AGENT.md 与后端风格对齐
2026-06-22 08:02:21 +08:00

40 lines
1.4 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ========== 一键安装脚本(Linux/macOS============
# 保存为 install.sh,执行: chmod +x install.sh && ./install.sh
#!/bin/bash
set -e
EMAIL="admin@violin-work.online" # ⚠️ 改成你的邮箱(Let's Encrypt 通知用)
DOMAIN="auth.violin-work.online" # ⚠️ 改成你的域名
echo "=== 1. 创建 namespace ==="
kubectl create ns auth --dry-run=client -o yaml | kubectl apply -f -
echo "=== 2. 创建 Secret ==="
kubectl apply -f 02-secret.yaml
echo "=== 3. 部署 PostgreSQL ==="
kubectl apply -f 01-postgres.yaml
echo "=== 4. 等待 PostgreSQL 就绪 ==="
kubectl wait --for=condition=ready pod -l app=authentik-postgres -n auth --timeout=120s
echo "=== 5. 添加 Helm 源并安装 Authentik ==="
helm repo add authentik https://charts.goauthentik.io --force-update
helm repo update
helm install authentik authentik/authentik -n auth -f auth-helm-values.yaml
echo "=== 6. 部署 Ingress + 证书 ==="
kubectl apply -f 03-ingress.yaml
echo "=== 7. 等待 Authentik Server 就绪 ==="
kubectl wait --for=condition=ready pod -l app.kubernetes.io/component=server -n auth --timeout=180s
echo ""
echo "=== 部署完成! ==="
echo "访问: https://$DOMAIN"
echo "初始设置: https://$DOMAIN/if/flow/initial/"
echo ""
echo "查看状态:"
echo " kubectl get pods -n auth"
echo " kubectl logs -n auth -l app.kubernetes.io/component=server --tail=50"