mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +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
|
|
@ -22,49 +22,10 @@ ingress:
|
|||
- hostname: git.mana.how
|
||||
service: http://localhost:3041
|
||||
|
||||
# ──────────────────────────────────────────────────────────
|
||||
# Backend APIs (Hono/Bun compute servers — stay separate)
|
||||
# ──────────────────────────────────────────────────────────
|
||||
- hostname: chat-api.mana.how
|
||||
service: http://localhost:3030
|
||||
- hostname: todo-api.mana.how
|
||||
service: http://localhost:3031
|
||||
- hostname: calendar-api.mana.how
|
||||
service: http://localhost:3032
|
||||
- hostname: clock-api.mana.how
|
||||
service: http://localhost:3033
|
||||
- hostname: contacts-api.mana.how
|
||||
service: http://localhost:3034
|
||||
- hostname: zitare-api.mana.how
|
||||
service: http://localhost:3007
|
||||
- hostname: skilltree-api.mana.how
|
||||
service: http://localhost:3038
|
||||
- hostname: cards-api.mana.how
|
||||
service: http://localhost:3009
|
||||
- hostname: storage-api.mana.how
|
||||
service: http://localhost:3035
|
||||
- hostname: presi-api.mana.how
|
||||
service: http://localhost:3036
|
||||
- hostname: nutriphi-api.mana.how
|
||||
service: http://localhost:3037
|
||||
- hostname: photos-api.mana.how
|
||||
service: http://localhost:3039
|
||||
- hostname: mukke-api.mana.how
|
||||
service: http://localhost:3010
|
||||
- hostname: picture-api.mana.how
|
||||
service: http://localhost:3040
|
||||
- hostname: clock-bot.mana.how
|
||||
service: http://localhost:4018
|
||||
|
||||
# NOTE: All web app subdomains (chat.mana.how, todo.mana.how, etc.)
|
||||
# are removed — they now run as routes under the unified app at mana.how
|
||||
# (e.g., mana.how/chat, mana.how/todo, etc.)
|
||||
|
||||
# AI Voice Services (local STT/TTS, läuft über mana-service-llm)
|
||||
- hostname: stt-api.mana.how
|
||||
service: http://localhost:3020
|
||||
- hostname: tts-api.mana.how
|
||||
service: http://localhost:3022
|
||||
# NOTE: Individual app backends (chat, todo, calendar, contacts, storage,
|
||||
# nutriphi, mukke, planta, picture, etc.) have been REMOVED — all migrated
|
||||
# to local-first architecture. Web apps run as routes under mana.how.
|
||||
# Only uload-server and memoro-server remain as app-specific backends.
|
||||
|
||||
# Games
|
||||
- hostname: whopxl.mana.how
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ scrape_configs:
|
|||
- targets: ['redis-exporter:9121']
|
||||
|
||||
# ============================================
|
||||
# Application Backends (after /metrics added)
|
||||
# Core Services (Hono/Bun + Go)
|
||||
# ============================================
|
||||
|
||||
# Auth Service
|
||||
|
|
@ -56,84 +56,51 @@ scrape_configs:
|
|||
metrics_path: '/metrics'
|
||||
scrape_interval: 30s
|
||||
|
||||
# Chat Backend
|
||||
- job_name: 'chat-backend'
|
||||
# Credits Service
|
||||
- job_name: 'mana-credits'
|
||||
static_configs:
|
||||
- targets: ['chat-backend:3030']
|
||||
- targets: ['mana-credits:3002']
|
||||
metrics_path: '/metrics'
|
||||
scrape_interval: 30s
|
||||
|
||||
# Todo Backend
|
||||
- job_name: 'todo-backend'
|
||||
# User Service
|
||||
- job_name: 'mana-user'
|
||||
static_configs:
|
||||
- targets: ['todo-backend:3031']
|
||||
- targets: ['mana-user:3062']
|
||||
metrics_path: '/metrics'
|
||||
scrape_interval: 30s
|
||||
|
||||
# Calendar Backend
|
||||
- job_name: 'calendar-backend'
|
||||
# Subscriptions Service
|
||||
- job_name: 'mana-subscriptions'
|
||||
static_configs:
|
||||
- targets: ['calendar-backend:3032']
|
||||
- targets: ['mana-subscriptions:3063']
|
||||
metrics_path: '/metrics'
|
||||
scrape_interval: 30s
|
||||
|
||||
# Clock Backend: REMOVED — migrated to local-first
|
||||
|
||||
# Contacts Backend
|
||||
- job_name: 'contacts-backend'
|
||||
# Analytics Service
|
||||
- job_name: 'mana-analytics'
|
||||
static_configs:
|
||||
- targets: ['contacts-backend:3033']
|
||||
- targets: ['mana-analytics:3064']
|
||||
metrics_path: '/metrics'
|
||||
scrape_interval: 30s
|
||||
|
||||
# Storage Backend
|
||||
- job_name: 'storage-backend'
|
||||
# ULoad Server
|
||||
- job_name: 'uload-server'
|
||||
static_configs:
|
||||
- targets: ['storage-backend:3034']
|
||||
- targets: ['mana-app-uload-server:3070']
|
||||
metrics_path: '/metrics'
|
||||
scrape_interval: 30s
|
||||
|
||||
# Presi Backend: REMOVED — replaced by Hono server
|
||||
|
||||
# Nutriphi Backend
|
||||
- job_name: 'nutriphi-backend'
|
||||
# Memoro Server
|
||||
- job_name: 'memoro-server'
|
||||
static_configs:
|
||||
- targets: ['nutriphi-backend:3038']
|
||||
- targets: ['mana-app-memoro-server:3015']
|
||||
metrics_path: '/metrics'
|
||||
scrape_interval: 30s
|
||||
|
||||
# SkillTree Backend: REMOVED — migrated to local-first
|
||||
|
||||
# Photos Backend: REMOVED — migrated to local-first + direct mana-media
|
||||
|
||||
# CityCorners Backend: REMOVED — migrated to local-first
|
||||
|
||||
# Zitare Backend: REMOVED — migrated to local-first
|
||||
|
||||
# Mukke Backend
|
||||
- job_name: 'mukke-backend'
|
||||
static_configs:
|
||||
- targets: ['mukke-backend:3037']
|
||||
metrics_path: '/metrics'
|
||||
scrape_interval: 30s
|
||||
|
||||
# Planta Backend
|
||||
- job_name: 'planta-backend'
|
||||
static_configs:
|
||||
- targets: ['planta-backend:3039']
|
||||
metrics_path: '/metrics'
|
||||
scrape_interval: 30s
|
||||
|
||||
# Picture Backend
|
||||
- job_name: 'picture-backend'
|
||||
static_configs:
|
||||
- targets: ['picture-backend:3035']
|
||||
metrics_path: '/metrics'
|
||||
scrape_interval: 30s
|
||||
|
||||
# ============================================
|
||||
# Core Services
|
||||
# ============================================
|
||||
# NOTE: Individual app backends (chat, todo, calendar, contacts, storage,
|
||||
# nutriphi, mukke, planta, picture) have been REMOVED — all migrated to
|
||||
# local-first architecture. Only uload-server and memoro-server remain.
|
||||
|
||||
# Mana LLM Gateway (Ollama + Google Fallback)
|
||||
- job_name: 'mana-llm'
|
||||
|
|
@ -255,32 +222,43 @@ scrape_configs:
|
|||
# Blackbox Exporter — HTTP Uptime Probes
|
||||
# ============================================
|
||||
|
||||
# Web Apps (SvelteKit frontends)
|
||||
# Web Apps (Unified ManaCore app at mana.how + standalone games)
|
||||
- job_name: 'blackbox-web'
|
||||
metrics_path: /probe
|
||||
params:
|
||||
module: [http_2xx]
|
||||
static_configs:
|
||||
- targets:
|
||||
# Unified ManaCore app (all modules as routes)
|
||||
- https://mana.how
|
||||
- https://chat.mana.how
|
||||
- https://todo.mana.how
|
||||
- https://calendar.mana.how
|
||||
- https://contacts.mana.how
|
||||
- https://clock.mana.how
|
||||
- https://photos.mana.how
|
||||
- https://picture.mana.how
|
||||
- https://storage.mana.how
|
||||
- https://presi.mana.how
|
||||
- https://nutriphi.mana.how
|
||||
- https://planta.mana.how
|
||||
- https://calc.mana.how
|
||||
- https://zitare.mana.how
|
||||
- https://cards.mana.how
|
||||
- https://skilltree.mana.how
|
||||
- https://mukke.mana.how
|
||||
- https://citycorners.mana.how
|
||||
- https://playground.mana.how
|
||||
- https://mana.how/chat
|
||||
- https://mana.how/todo
|
||||
- https://mana.how/calendar
|
||||
- https://mana.how/contacts
|
||||
- https://mana.how/times
|
||||
- https://mana.how/photos
|
||||
- https://mana.how/picture
|
||||
- https://mana.how/storage
|
||||
- https://mana.how/presi
|
||||
- https://mana.how/nutriphi
|
||||
- https://mana.how/planta
|
||||
- https://mana.how/calc
|
||||
- https://mana.how/zitare
|
||||
- https://mana.how/cards
|
||||
- https://mana.how/skilltree
|
||||
- https://mana.how/mukke
|
||||
- https://mana.how/citycorners
|
||||
- https://mana.how/memoro
|
||||
- https://mana.how/moodlit
|
||||
- https://mana.how/context
|
||||
- https://mana.how/questions
|
||||
- https://mana.how/uload
|
||||
- https://mana.how/notes
|
||||
- https://mana.how/habits
|
||||
- https://mana.how/guides
|
||||
- https://mana.how/inventar
|
||||
- https://mana.how/playground
|
||||
# Standalone games (separate containers)
|
||||
- https://whopxl.mana.how
|
||||
- https://arcade.mana.how
|
||||
relabel_configs:
|
||||
|
|
@ -291,7 +269,7 @@ scrape_configs:
|
|||
- target_label: __address__
|
||||
replacement: blackbox-exporter:9115
|
||||
|
||||
# API Health Endpoints
|
||||
# API Health Endpoints (only services with running containers)
|
||||
- job_name: 'blackbox-api'
|
||||
metrics_path: /probe
|
||||
params:
|
||||
|
|
@ -300,14 +278,6 @@ scrape_configs:
|
|||
- targets:
|
||||
- https://auth.mana.how/health
|
||||
- https://api.mana.how/health
|
||||
- https://chat-api.mana.how/health
|
||||
- https://todo-api.mana.how/health
|
||||
- https://calendar-api.mana.how/health
|
||||
- https://contacts-api.mana.how/health
|
||||
- https://storage-api.mana.how/health
|
||||
- https://nutriphi-api.mana.how/health
|
||||
- https://planta-api.mana.how/health
|
||||
- https://picture-api.mana.how/health
|
||||
relabel_configs:
|
||||
- source_labels: [__address__]
|
||||
target_label: __param_target
|
||||
|
|
|
|||
|
|
@ -59,11 +59,22 @@ get_instances() {
|
|||
# Freundlicher Name aus URL
|
||||
friendly_name() {
|
||||
url="$1"
|
||||
# Entferne https:// und .mana.how
|
||||
# Entferne https://
|
||||
name="${url#https://}"
|
||||
# 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