Some checks failed
Forge CI / smoke-and-build (pull_request) Failing after 59s
Cherry-pick the Hermes Web Console from gary-the-ai/hermes-web-console-gui. React + TypeScript frontend with Vite, Python aiohttp backend API. Components: - web_console/ — React frontend (chat, sessions, memory, settings, skills, gateway config, cron, workspace, tools, browser, insights pages) - gateway/web_console/ — Python backend API (23 endpoints, SSE event bus, 11 service modules) - gateway/platforms/api_server_ui.py — embedded browser UI for API server - gateway/platforms/api_server.py — route registration refactored into _register_routes(), web console mounted via maybe_register_web_console() - run-gui.sh / setup-gui.sh — one-command launch and setup scripts - tests/gateway/test_api_server_gui_mount.py — 4 integration tests (passing) - tests/web_console/ — 13 backend test files (51 passing) - docs/plans/ — implementation plan, API schema, frontend architecture Fix: added missing ModelContextError class and CRON_MIN_CONTEXT_TOKENS to cron/scheduler.py (pre-existing import bug). Closes #325
35 lines
922 B
Docker
35 lines
922 B
Docker
# Stage 1: Build
|
|
FROM node:20-alpine AS build
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# Stage 2: Serve
|
|
FROM nginx:alpine
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
COPY --from=build /app/manifest.json /usr/share/nginx/html/manifest.json
|
|
COPY --from=build /app/sw.js /usr/share/nginx/html/sw.js
|
|
|
|
# Nginx config for SPA + reverse proxy to backend
|
|
RUN echo 'server { \
|
|
listen 80; \
|
|
root /usr/share/nginx/html; \
|
|
index index.html; \
|
|
location /api/ { \
|
|
proxy_pass http://hermes-backend:8765; \
|
|
proxy_http_version 1.1; \
|
|
proxy_set_header Upgrade $http_upgrade; \
|
|
proxy_set_header Connection "upgrade"; \
|
|
proxy_set_header Host $host; \
|
|
proxy_read_timeout 300s; \
|
|
} \
|
|
location / { \
|
|
try_files $uri $uri/ /index.html; \
|
|
} \
|
|
}' > /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"]
|