mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-17 00:19:41 +02:00
fix(infra): update status page, prometheus, and cloudflared for unified app
All web app subdomains (chat.mana.how, todo.mana.how, etc.) were removed when the unified app launched, but monitoring configs still referenced them. Update blackbox targets to use mana.how/route URLs, remove stale API backend routes from cloudflared, clean up CORS origins, and fix status page generator to handle route-based URLs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
543e7055b9
commit
62d9eb1f2b
9 changed files with 106 additions and 158 deletions
|
|
@ -59,11 +59,22 @@ get_instances() {
|
|||
# Freundlicher Name aus URL
|
||||
friendly_name() {
|
||||
url="$1"
|
||||
# Entferne https:// und .mana.how
|
||||
# Entferne https://
|
||||
name="${url#https://}"
|
||||
name="${name%.mana.how}"
|
||||
# Route-basierte URLs: mana.how/chat → Chat
|
||||
case "$name" in
|
||||
mana.how/*)
|
||||
name="${name#mana.how/}"
|
||||
;;
|
||||
*)
|
||||
# Subdomain-basiert: chat.mana.how → Chat
|
||||
name="${name%.mana.how}"
|
||||
;;
|
||||
esac
|
||||
# Entferne /health suffix
|
||||
name="${name%/health}"
|
||||
# mana.how (ohne Route) → ManaCore
|
||||
[ "$name" = "mana.how" ] && name="ManaCore"
|
||||
# Erster Buchstabe groß (POSIX-kompatibel)
|
||||
printf '%s' "$name" | awk '{print toupper(substr($0,1,1)) substr($0,2)}'
|
||||
}
|
||||
|
|
@ -170,21 +181,29 @@ fi
|
|||
# Gibt Tier-Badge-HTML für eine Blackbox-URL zurück (leer wenn kein Match)
|
||||
get_tier_badge() {
|
||||
url="$1"
|
||||
# Subdomain extrahieren: https://todo.mana.how → todo, https://todo-api.mana.how/health → todo-api
|
||||
subdomain="${url#https://}"
|
||||
subdomain="${subdomain%.mana.how*}"
|
||||
subdomain="${subdomain%/health}"
|
||||
raw="${url#https://}"
|
||||
# Route-basierte URLs: mana.how/chat → chat
|
||||
case "$raw" in
|
||||
mana.how/*)
|
||||
appid="${raw#mana.how/}"
|
||||
;;
|
||||
*)
|
||||
# Subdomain-basiert: todo.mana.how → todo
|
||||
appid="${raw%.mana.how*}"
|
||||
appid="${appid%/health}"
|
||||
;;
|
||||
esac
|
||||
# API-Subdomains skippen (z.B. todo-api, chat-api)
|
||||
case "$subdomain" in *-api) return ;; esac
|
||||
# Subdomain-Aliase (Sonderfälle + alte Subdomains → aktuelle App-IDs)
|
||||
case "$subdomain" in
|
||||
mana.how) subdomain="manacore" ;;
|
||||
manadeck) subdomain="cards" ;;
|
||||
inventar) subdomain="inventory" ;;
|
||||
case "$appid" in *-api) return ;; esac
|
||||
# Aliase (Sonderfälle → aktuelle App-IDs)
|
||||
case "$appid" in
|
||||
mana.how) appid="manacore" ;;
|
||||
manadeck) appid="cards" ;;
|
||||
inventar) appid="inventory" ;;
|
||||
esac
|
||||
|
||||
echo "$TIER_APPS" | while IFS='|' read -r id name tier st; do
|
||||
[ "$id" = "$subdomain" ] || continue
|
||||
[ "$id" = "$appid" ] || continue
|
||||
printf '<span class="badge tier-%s">%s</span>' "$tier" "$tier"
|
||||
break
|
||||
done
|
||||
|
|
@ -461,6 +480,7 @@ echo "$SUCCESS_JSON" | jq \
|
|||
| rtrimstr("/health")
|
||||
| rtrimstr("/")
|
||||
| if . == "mana.how" then "manacore"
|
||||
elif startswith("mana.how/") then ltrimstr("mana.how/")
|
||||
else rtrimstr(".mana.how")
|
||||
end
|
||||
),
|
||||
|
|
|
|||
|
|
@ -230,17 +230,14 @@ Once running, services are available at:
|
|||
|
||||
| Service | URL |
|
||||
|---------|-----|
|
||||
| Dashboard | https://mana.how |
|
||||
| Unified App | https://mana.how |
|
||||
| Auth API | https://auth.mana.how |
|
||||
| Chat | https://chat.mana.how |
|
||||
| Chat API | https://chat-api.mana.how |
|
||||
| Todo | https://todo.mana.how |
|
||||
| Todo API | https://todo-api.mana.how |
|
||||
| Calendar | https://calendar.mana.how |
|
||||
| Calendar API | https://calendar-api.mana.how |
|
||||
| Clock | https://clock.mana.how |
|
||||
| Clock API | https://clock-api.mana.how |
|
||||
| STT API | http://localhost:3020 (internal only) |
|
||||
| API Gateway | https://api.mana.how |
|
||||
| Forgejo (Git) | https://git.mana.how |
|
||||
| Grafana | https://grafana.mana.how |
|
||||
| Status Page | https://status.mana.how |
|
||||
| GlitchTip | https://glitchtip.mana.how |
|
||||
| Umami | https://stats.mana.how |
|
||||
| SSH | ssh mac-mini (via cloudflared) |
|
||||
|
||||
## Native Services (non-Docker)
|
||||
|
|
|
|||
|
|
@ -109,10 +109,10 @@ echo ""
|
|||
echo "=== Deployment Complete ==="
|
||||
echo ""
|
||||
echo "URLs via Cloudflare Tunnel:"
|
||||
echo " https://mana.how - Dashboard"
|
||||
echo " https://mana.how - Unified App (all modules)"
|
||||
echo " https://auth.mana.how - Auth API"
|
||||
echo " https://chat.mana.how - Chat"
|
||||
echo " https://todo.mana.how - Todo"
|
||||
echo " https://calendar.mana.how - Calendar"
|
||||
echo " https://clock.mana.how - Clock"
|
||||
echo " https://api.mana.how - API Gateway"
|
||||
echo " https://git.mana.how - Forgejo"
|
||||
echo " https://grafana.mana.how - Grafana"
|
||||
echo " https://status.mana.how - Status Page"
|
||||
echo ""
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
<key>GENERATION_TIMEOUT</key>
|
||||
<string>300</string>
|
||||
<key>CORS_ORIGINS</key>
|
||||
<string>https://mana.how,https://picture.mana.how,https://chat.mana.how</string>
|
||||
<string>https://mana.how</string>
|
||||
</dict>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ cat > "$PLIST_PATH" << EOF
|
|||
<key>GENERATION_TIMEOUT</key>
|
||||
<string>120</string>
|
||||
<key>CORS_ORIGINS</key>
|
||||
<string>https://mana.how,https://picture.mana.how,https://chat.mana.how,http://localhost:5173</string>
|
||||
<string>https://mana.how,http://localhost:5173</string>
|
||||
</dict>
|
||||
|
||||
<key>RunAtLoad</key>
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ cat > "$PLIST_PATH" << EOF
|
|||
<key>PRELOAD_MODELS</key>
|
||||
<string>false</string>
|
||||
<key>CORS_ORIGINS</key>
|
||||
<string>https://mana.how,https://chat.mana.how,https://todo.mana.how</string>
|
||||
<string>https://mana.how</string>
|
||||
</dict>
|
||||
|
||||
<key>RunAtLoad</key>
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ cat > "$PLIST_PATH" << EOF
|
|||
<key>MAX_TEXT_LENGTH</key>
|
||||
<string>1000</string>
|
||||
<key>CORS_ORIGINS</key>
|
||||
<string>https://mana.how,https://chat.mana.how,https://todo.mana.how,https://zitare.mana.how</string>
|
||||
<string>https://mana.how</string>
|
||||
</dict>
|
||||
|
||||
<key>RunAtLoad</key>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue