refactor: complete rewrite as React+FastAPI dashboard
Replace monolithic Jinja2 template with modern stack: Backend (FastAPI): - Modular router/service architecture - Async PostgreSQL (asyncpg) for news from n8n pipeline - Live Unraid server stats (2 servers via API) - Home Assistant, Vikunja tasks, weather (wttr.in) - WebSocket broadcast for real-time updates (15s) - TTL cache per endpoint, all config via ENV vars Frontend (React + Vite + TypeScript): - Glassmorphism dark theme with Tailwind CSS - Responsive grid: mobile/tablet/desktop/ultrawide - Weather cards, hourly forecast, news with category tabs - Server stats (CPU ring, RAM bar, Docker list) - Home Assistant controls, task management - Live clock, WebSocket connection indicator Infrastructure: - Multi-stage Dockerfile (node:22-alpine + python:3.11-slim) - docker-compose with full ENV configuration - Kaniko CI/CD pipeline for GitLab registry Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4bbc125a67
commit
9f7330e217
48 changed files with 6390 additions and 1461 deletions
|
|
@ -1,5 +1,3 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
daily-briefing:
|
||||
build: .
|
||||
|
|
@ -7,25 +5,23 @@ services:
|
|||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
- VIKUNJA_URL=http://10.10.10.10:3456/api/v1
|
||||
- VIKUNJA_TOKEN=tk_dfaf845721a9fabe0656960ab77fd57cba127f8d
|
||||
- HA_URL=https://homeassistant.daddelolymp.de
|
||||
- HA_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkZmM4M2Q5OTZiMDE0Mzg3YWEzZTMwYzkzYTNhNTRjNiIsImlhdCI6MTc3MDU5Mjk3NiwiZXhwIjoyMDg1OTUyOTc2fQ.fnldrKNQwVdz275-omj93FldpywEpfPQSq8VLcmcyu4
|
||||
# Database (PostgreSQL)
|
||||
- DB_HOST=10.10.10.10
|
||||
- DB_PORT=5433
|
||||
- DB_NAME=openclaw
|
||||
- DB_USER=sam
|
||||
- DB_PASSWORD=sam
|
||||
# Weather
|
||||
- WEATHER_LOCATION=Leverkusen
|
||||
- OPENCLAW_GATEWAY_URL=http://host.docker.internal:18789
|
||||
- DASHBOARD_DATA_PATH=/app/data/dashboard_data.json
|
||||
# Discord Integration
|
||||
- DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/1470494144953581652/7g3rq2p-ynwTR9KyUhYwubIZL75NQkOR_xnXOvSsuY72qwUjmsSokfSS3Y0wae2veMem
|
||||
- DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN:-}
|
||||
- DISCORD_CHANNEL_ID=${DISCORD_CHANNEL_ID:-}
|
||||
volumes:
|
||||
- /home/sam/briefing/dashboard_data.json:/app/data/dashboard_data.json:ro
|
||||
- WEATHER_LOCATION_SECONDARY=Rab,Croatia
|
||||
# Home Assistant
|
||||
- HA_URL=https://homeassistant.daddelolymp.de
|
||||
- HA_TOKEN=${HA_TOKEN}
|
||||
# Vikunja Tasks
|
||||
- VIKUNJA_URL=http://10.10.10.10:3456/api/v1
|
||||
- VIKUNJA_TOKEN=${VIKUNJA_TOKEN}
|
||||
# Unraid Servers (JSON array)
|
||||
- UNRAID_SERVERS=${UNRAID_SERVERS:-[]}
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
restart: always
|
||||
networks:
|
||||
- briefing-network
|
||||
|
||||
networks:
|
||||
briefing-network:
|
||||
driver: bridge
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue