Add Docker/Lightsail deployment, web search summarization, and fix vite peer dep
- Add backend/frontend Dockerfiles, nginx reverse proxy config, and docker-compose.yml to run the app on AWS Lightsail; document the setup in docs/deploy-lightsail.md. Fix a .gitignore path anchoring bug that left backend/knowledge_base/web_search/ untracked instead of ignored. - Summarize web search results into structured Markdown via LLM before saving them to the local knowledge base, and support regenerating existing entries from their source URLs (backend/app/core/memory_kb). - Downgrade vite to ^6 to match @vitejs/plugin-vue's peer dependency range, fixing a failing `npm ci` (found while testing the Docker build). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
node_modules/
|
||||
dist/
|
||||
.vite/
|
||||
@@ -0,0 +1,12 @@
|
||||
FROM node:22-slim AS build
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:1.27-alpine
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80
|
||||
@@ -0,0 +1,27 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# SPA フォールバック
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# バックエンド API へのリバースプロキシ(/chat/stream は SSE のためバッファリング無効化)
|
||||
location ~ ^/(chat|api|memory|logs|health) {
|
||||
proxy_pass http://backend:8000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
proxy_buffering off;
|
||||
proxy_cache off;
|
||||
proxy_read_timeout 300s;
|
||||
chunked_transfer_encoding off;
|
||||
}
|
||||
}
|
||||
Generated
+744
-208
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,7 @@
|
||||
"@types/dompurify": "^3.0.5",
|
||||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
"typescript": "^5.4.0",
|
||||
"vite": "^8.0.16",
|
||||
"vite": "^6.0.0",
|
||||
"vue-tsc": "^2.0.6"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user