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.
26 lines
770 B
Bash
Executable File
26 lines
770 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# deploy.sh — spin up (or update) the Nexus staging environment
|
|
# Usage: ./deploy.sh — rebuild and restart nexus-main (HTTP :8080, WS :8765)
|
|
# ./deploy.sh staging — rebuild and restart nexus-staging (HTTP :8081, WS :8766)
|
|
set -euo pipefail
|
|
|
|
SERVICE="${1:-nexus-main}"
|
|
|
|
case "$SERVICE" in
|
|
staging) SERVICE="nexus-staging" ;;
|
|
main) SERVICE="nexus-main" ;;
|
|
esac
|
|
|
|
echo "==> Deploying $SERVICE …"
|
|
docker compose build "$SERVICE"
|
|
docker compose up -d --force-recreate "$SERVICE"
|
|
|
|
if [ "$SERVICE" = "nexus-main" ]; then
|
|
echo "==> HTTP: http://localhost:8080"
|
|
echo "==> WS: ws://localhost:8765"
|
|
else
|
|
echo "==> HTTP: http://localhost:8081"
|
|
echo "==> WS: ws://localhost:8766"
|
|
fi
|
|
echo "==> Done. Container: $SERVICE"
|