mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(docker): build web/ dashboard assets in image (#12180)
The Dockerfile installs root-level npm dependencies (for Playwright) and the whatsapp-bridge bundle, but never builds the web/ Vite project. As a result, 'hermes dashboard' starts FastAPI on :9119 but serves a broken SPA because hermes_cli/web_dist/ is empty and requests to /assets/index-<hash>.js 404. Add a build step inside web/ so the Vite output is baked into the image. Reproduce (before): docker build -t hermes-repro -f Dockerfile . docker run --rm -p 9119:9119 hermes-repro hermes dashboard curl -sI http://localhost:9119/assets/ | head -1 # -> 404 After: /assets/ returns the built asset path.
This commit is contained in:
parent
c14b3b5880
commit
b0bde98b0f
1 changed files with 6 additions and 0 deletions
|
|
@ -31,6 +31,12 @@ RUN npm install --prefer-offline --no-audit && \
|
|||
npm install --prefer-offline --no-audit && \
|
||||
npm cache clean --force
|
||||
|
||||
# Build the web/ dashboard so FastAPI at :9119 can serve the Vite assets
|
||||
RUN cd /opt/hermes/web && \
|
||||
npm install --prefer-offline --no-audit && \
|
||||
npm run build && \
|
||||
npm cache clean --force
|
||||
|
||||
# Hand ownership to hermes user, then install Python deps in a virtualenv
|
||||
RUN chown -R hermes:hermes /opt/hermes
|
||||
USER hermes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue