Closes #1339. The Nexus Three.js app required HTTP serving for module imports to work (file:// and raw Forge URLs break). This change: - server.py: dual-purpose async server — HTTP on :8080 (static files) and WebSocket on :8765 (broadcast gateway), single process - Dockerfile: exposes both 8080 (HTTP) and 8765 (WS), includes all frontend assets (boot.js, bootstrap.mjs, gofai_worker.js, etc.) - docker-compose.yml: maps HTTP :8080/:8081 + WS :8765/:8766 - deploy.sh: updated for new port layout - run.sh: standalone no-Docker launcher - app.js: WS URL derives from HTTP port (8080->8765, 8081->8766) - deploy.yml workflow: docker compose on remote host To deploy: `./deploy.sh` (Docker) or `./run.sh` (bare metal). Open http://HOST:8080 in a browser — Three.js modules load correctly.
27 lines
535 B
Docker
27 lines
535 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install Python deps
|
|
COPY requirements.txt ./
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Backend
|
|
COPY nexus/ nexus/
|
|
COPY server.py ./
|
|
|
|
# Frontend assets referenced by index.html
|
|
COPY index.html help.html style.css app.js boot.js bootstrap.mjs gofai_worker.js mempalace.js service-worker.js manifest.json ./
|
|
|
|
# Config/data
|
|
COPY portals.json vision.json robots.txt ./
|
|
|
|
# Icons
|
|
COPY icons/ icons/
|
|
|
|
# Expose HTTP (static) and WebSocket
|
|
EXPOSE 8080
|
|
EXPOSE 8765
|
|
|
|
CMD ["python3", "server.py"]
|