mirror of
https://github.com/R0m1k3/Loki.git
synced 2026-10-11 17:26:57 +02:00
- Scaffold full-stack : backend FastAPI + frontend React/Vite/TS/Tailwind - Design system fidèle au thème (palette ambre/café, JetBrains Mono, tokens Tailwind) - Layout 3 panneaux : activity bar, historique/fichiers, chat, aperçu - Connexion Ollama : statut live, liste des modèles, pull avec progression SSE, sélecteur de modèle - Vue Configuration (Frame 2) : modèles, génération, outils, invite système - Dockerfile multi-stage + docker-compose (Ollama externe par défaut, profil ollama optionnel) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SVay7z3y7q2gEe54ByAE6N
31 lines
955 B
Docker
31 lines
955 B
Docker
# ── Étape 1 : build du frontend ─────────────────────────────────────────
|
|
FROM node:20-alpine AS frontend
|
|
WORKDIR /app/frontend
|
|
COPY frontend/package.json frontend/package-lock.json* ./
|
|
RUN npm install
|
|
COPY frontend/ ./
|
|
RUN npm run build
|
|
|
|
# ── Étape 2 : runtime backend (sert aussi le front statique) ────────────
|
|
FROM python:3.12-slim AS runtime
|
|
WORKDIR /app
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
WORKSPACE_DIR=/workspace \
|
|
DATA_DIR=/data \
|
|
PORT=8080
|
|
|
|
COPY backend/requirements.txt ./
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY backend/ ./backend/
|
|
# Frontend compilé servi en statique par FastAPI
|
|
COPY --from=frontend /app/frontend/dist ./backend/static
|
|
|
|
RUN mkdir -p /workspace /data
|
|
|
|
EXPOSE 8080
|
|
WORKDIR /app/backend
|
|
CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT}"]
|