Commit graph

24 commits

Author SHA1 Message Date
Till-JS
ebd0e53c9a 🔧 chore(watchtower): switch to nickfedor fork with telegram notifications
- Use nickfedor/watchtower:latest (maintained fork, v1.14.0)
- Add notification template for updates and failures
- Template only sends when there are actual changes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:29:57 +01:00
Till-JS
4573f6ec13 feat(web): add /health endpoints to all web apps
Add health check endpoints for Docker container monitoring:
- calendar-web
- clock-web
- contacts-web
- manacore-web
- manadeck-web
- nutriphi-web
- picture-web
- presi-web
- storage-web
- zitare-web

Also update todo-web docker-compose health check to use /health

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:15:04 +01:00
Till-JS
2480d92699 🔧 chore(watchtower): try list format for telegram notification URL
Use list format for environment variables as suggested in shoutrrr
issue #45 to avoid YAML parsing issues with colon in bot token.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:14:30 +01:00
Till-JS
0b35e71f90 fix(docker): use 127.0.0.1 instead of localhost in health checks
wget tries IPv6 [::1] when using localhost, but Node.js apps typically
listen on IPv4 only. Using 127.0.0.1 ensures IPv4 is used.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:07:21 +01:00
Till-JS
57a7a39cd0 fix(docker): use root path for todo-web health check
The /health endpoint requires a new Docker image build. Use root path
temporarily until the new image is deployed via Watchtower.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:04:35 +01:00
Till-JS
98c08fd8d0 🔧 chore(watchtower): disable broken telegram notifications
Shoutrrr has URL parsing issues with Telegram bot tokens containing
colons. Auto-deployment works fine - notifications can be added later
via n8n webhook workflow if needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:02:48 +01:00
Till-JS
bbc536d83c fix(docker): correct todo-backend health check path in compose
Health check was using /api/v1/health but endpoint is /health

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:02:24 +01:00
Till-JS
d2b1a1c8a9 🔧 chore(watchtower): use URL-encoded telegram token from env
Move notification URL to .env.macmini with URL-encoded colon (%3A)
in the Telegram bot token to avoid shoutrrr parsing issues.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:01:43 +01:00
Till-JS
cacebabe55 🔧 chore(watchtower): switch to n8n webhook for notifications
Switch from direct Telegram URL (which has parsing issues with colon
in bot token) to generic HTTP webhook via n8n for reliable notifications.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:00:49 +01:00
Till-JS
882053251d 🔧 chore(watchtower): add debug logging for telegram notifications
- Enable WATCHTOWER_DEBUG for verbose logs
- Add trailing slash to telegram URL (shoutrrr format fix)
- Enable WATCHTOWER_NOTIFICATION_REPORT for testing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 09:53:45 +01:00
Till-JS
8c259a008b feat(monitoring): add comprehensive Grafana dashboards and alerting
New dashboards:
- Application Details: Node.js runtime (heap, event loop, GC),
  HTTP details (status codes, methods, top routes), error analysis
- Database Details: PostgreSQL and Redis metrics with detailed breakdowns

Alerting rules (docker/prometheus/alerts.yml):
- Service: down, high/very high error rate, slow response time
- Infrastructure: high CPU/memory/disk usage
- Database: PostgreSQL/Redis down, high connections, low cache hit
- Container: high CPU/memory, restarts

All dashboards include service selector variable for filtering.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 09:47:18 +01:00
Till-JS
41dea775a6 fix(watchtower): use existing TELEGRAM env vars for notifications
Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-26 09:45:39 +01:00
Till-JS
87724f8abf fix(watchtower): remove custom notification template
Use default Watchtower notifications instead.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-25 14:03:43 +01:00
Till-JS
62e9d0d37a fix(watchtower): set DOCKER_API_VERSION for compatibility
Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-25 14:03:05 +01:00
Till-JS
ac663a6c91 chore: remove staging/Hetzner infra, add Watchtower auto-deploy
- Remove old Hetzner deployment workflows (cd-staging, cd-production)
- Remove staging docker-compose files
- Remove outdated staging/Hetzner documentation
- Add Watchtower to docker-compose.macmini.yml for auto-updates
- Update CLAUDE.md with Mac Mini server access
- Simplify docs/DEPLOYMENT.md for new architecture

Production now runs on Mac Mini with automatic deployments via Watchtower.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-25 14:01:11 +01:00
Till-JS
32c207ecd5 feat(infra): add presi and storage apps to Mac Mini deployment
- Add presi-backend (port 3008) and presi-web (port 5178)
- Add storage-backend (port 3019) and storage-web (port 5185)
- Configure storage-backend with MinIO S3 integration
- Update mana-core-auth CORS for new app domains

New domains:
- presi.mana.how / presi-api.mana.how
- storage.mana.how / storage-api.mana.how

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:52:45 +01:00
Till-JS
a1d491e246 feat(infra): add n8n workflow automation to Mac Mini
- Add n8n container with PostgreSQL backend
- Configure webhook URL for n8n.mana.how
- Add persistent volume for n8n data
- Set timezone to Europe/Berlin

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:08:34 +01:00
Till-JS
c399474889 feat(infra): add MinIO for object storage and configure contacts-backend
- Add MinIO service for S3-compatible object storage
- Configure contacts-backend with S3 environment variables
- Add minio_data volume

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:45:10 +01:00
Till-JS
6d86a08d63 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>
2026-01-23 15:31:39 +01:00
Till-JS
bb5f145286 feat(contacts): add Docker deployment for Mac Mini
- Add Dockerfile for contacts-backend (port 3015)
- Add Dockerfile for contacts-web (port 5184)
- Add docker-entrypoint.sh for database migrations
- Update CI workflow with contacts-backend and contacts-web build jobs
- Add contacts services to docker-compose.macmini.yml
- Update CORS origins to include contacts.mana.how

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 14:23:49 +01:00
Till-JS
294074f5f7 fix(calendar-web): add cross-app API URLs for todo and contacts
Add PUBLIC_TODO_BACKEND_URL and PUBLIC_CONTACTS_API_URL environment
variables to calendar-web container for cross-app integrations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 14:15:15 +01:00
Till-JS
bff168ee43 fix(docker): correct todo-backend health check path
Changed from /api/health to /api/v1/health to match the actual endpoint.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 12:18:26 +01:00
Till-JS
a7783ca973 fix: add BETTER_AUTH_SECRET to mac mini compose
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 23:55:10 +01:00
Till-JS
4ebe3ec574 feat: add multi-arch Docker builds and Mac Mini deployment
- CI: Build Docker images for linux/amd64 + linux/arm64
- CI: Add manacore-web to build matrix
- Add docker-compose.macmini.yml for Mac Mini deployment
- Add cloudflared-config.yml for Cloudflare Tunnel routing
- Add Mac Mini deployment scripts and documentation
- Configure Cloudflared as launchd service for auto-start

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 19:17:37 +01:00