mirror of
https://github.com/Alkatrazz24/Funk-lab.git
synced 2026-07-08 05:24:43 +02:00
| .. | ||
| deployment.yaml | ||
| ingress.yaml | ||
| middleware.yaml | ||
| pvc.yaml | ||
| README.md | ||
| service.yaml | ||
FinLab — dashboard + console Claude Code (in-cluster)
Deux usages, une image, un workspace partagé :
- Dashboard (
finance.lab.local/) — interface web : graphiques chandeliers (MM50/200 + volume), portefeuille (P&L, poids, secteurs), watchlists thématiques scannées, alertes du jour, actions (plan de trade R:R). Données finlab (Yahoo Finance) — aucun LLM, aucune clé. - Console (
finance.lab.local/console/) — vraie session Claude Code dans un terminal web (ttyd), sur ton abonnement (login persisté), persona finance + outils finlab en MCP.
⚠️ La console expose un shell web → tout est derrière basicAuth Traefik. Analyse et aide à la décision uniquement : aucun ordre réel (paper trading Alpaca fictif seul).
Image & code
CI (.github/workflows/build-finlab.yml) build depuis tools/finlab/ → ghcr.io/alkatrazz24/funk-finlab.
Le code (package finlab + backend dashboard) vit dans l'image (/opt/app) et se met à
jour avec elle. Les configs éditables (portefeuille/watchlists/alertes) + la persona + le
login vivent dans le workspace persistant (FINLAB_HOME=/home/finlab/workspace, sur le PVC).
Architecture du pod
| Élément | Rôle |
|---|---|
initContainer seed |
Peuple le workspace depuis l'image (cp -rn), robuste au piège NFS (recrée le dossier si root/non-inscriptible). Tourne avant les conteneurs |
container console |
ttyd -b /console → claude dans le workspace (port 7681) |
container dashboard |
uvicorn dashboard.server:app (port 8800), lit FINLAB_HOME |
PVC finlab-data (5Gi NFS) |
/home/finlab : ~/.claude (login) + workspace (configs + .cache) |
Service finlab |
web:8800 + console:7681 |
Middleware finlab-auth |
basicAuth Traefik (secret htpasswd) |
| IngressRoute | /console → 7681 · reste → 8800 (les deux derrière finlab-auth) |
Pré-requis manuels (une fois)
1. Secret de pull GHCR (si absent du ns ai)
kubectl -n ai create secret docker-registry ghcr-pull \
--docker-server=ghcr.io --docker-username=Alkatrazz24 \
--docker-password=<GHCR_PAT_read_packages>
2. Secret basicAuth finlab-auth
kubectl -n ai create secret generic finlab-auth \
--from-literal=users="alkatrazz:$(openssl passwd -apr1 'MOT_DE_PASSE')"
3. Premier boot — login Claude Code (pour la console)
- Ouvrir http://finance.lab.local/console/ (basicAuth), lancer
claude, puis/login. - Le dashboard est sur http://finance.lab.local/ (rien à configurer).
Configs éditables dans le workspace (
portfolio.yaml…) : depuis la console, oukubectl -n ai exec deploy/finlab -c console -- python -m finlab.cli digest.