mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 22:41:09 +02:00
feat: add monitoring dashboard (Prometheus + Grafana + Umami + Admin)
Phase 1: Infrastructure - Add docker/prometheus/prometheus.yml with scrape configs for all services - Add docker/grafana/provisioning for auto-configured datasources - Add docker/grafana/dashboards (system-overview, backends-docker) - Update docker-compose.macmini.yml with monitoring services: - prometheus, grafana, node-exporter, cadvisor - postgres-exporter, redis-exporter, umami - Add grafana.mana.how and analytics.mana.how to Caddyfile Phase 2: Backend Metrics - Create packages/shared-nestjs-metrics with: - MetricsModule (auto /metrics endpoint) - MetricsService (Counter, Histogram, Gauge helpers) - MetricsMiddleware (auto HTTP request tracking) Phase 3: Umami Web Analytics - Add Umami tracking scripts to all landing pages - Add Umami tracking scripts to all web apps - Create scripts/mac-mini/setup-umami-db.sh Phase 4: Admin Dashboard (ManaCore Web) - Add admin routes: /admin, /admin/users, /admin/system - Create StatCard, QuickLinks, UserTable components - Add Admin link to navigation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
ad7a84feef
commit
6d86a08d63
36 changed files with 2779 additions and 559 deletions
27
scripts/mac-mini/setup-umami-db.sh
Executable file
27
scripts/mac-mini/setup-umami-db.sh
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
# Setup Umami database on Mac Mini
|
||||
# Run this script after starting PostgreSQL container
|
||||
|
||||
set -e
|
||||
|
||||
echo "Creating Umami database..."
|
||||
|
||||
# Check if running inside docker network or from host
|
||||
if docker ps | grep -q manacore-postgres; then
|
||||
docker exec -i manacore-postgres psql -U postgres <<EOF
|
||||
SELECT 'CREATE DATABASE umami' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'umami')\gexec
|
||||
EOF
|
||||
echo "Umami database created successfully!"
|
||||
else
|
||||
echo "Error: PostgreSQL container 'manacore-postgres' is not running"
|
||||
echo "Please start it with: docker compose -f docker-compose.macmini.yml up -d postgres"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Next steps:"
|
||||
echo "1. Start Umami: docker compose -f docker-compose.macmini.yml up -d umami"
|
||||
echo "2. Access Umami at: https://analytics.mana.how"
|
||||
echo "3. Default login: admin / umami"
|
||||
echo "4. Change the password immediately!"
|
||||
echo "5. Create websites and get tracking IDs for your apps"
|
||||
Loading…
Add table
Add a link
Reference in a new issue