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.
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
name: Deploy Nexus
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Preflight secrets check
|
|
env:
|
|
H: ${{ secrets.DEPLOY_HOST }}
|
|
U: ${{ secrets.DEPLOY_USER }}
|
|
K: ${{ secrets.DEPLOY_SSH_KEY }}
|
|
run: |
|
|
[ -z "$H" ] || [ -z "$U" ] || [ -z "$K" ] && echo "ERROR: Missing deploy secret. Configure DEPLOY_HOST/DEPLOY_USER/DEPLOY_SSH_KEY in Settings → Actions → Secrets (see issue #1363)" && exit 1
|
|
|
|
- name: Deploy to host via SSH
|
|
uses: appleboy/ssh-action@v1.0.3
|
|
with:
|
|
host: ${{ secrets.DEPLOY_HOST }}
|
|
username: ${{ secrets.DEPLOY_USER }}
|
|
key: ${{ secrets.DEPLOY_SSH_KEY }}
|
|
script: |
|
|
cd ~/the-nexus || git clone https://forge.alexanderwhitestone.com/Timmy_Foundation/the-nexus.git ~/the-nexus
|
|
cd ~/the-nexus
|
|
git fetch origin main
|
|
git reset --hard origin/main
|
|
docker compose build nexus-main
|
|
docker compose up -d --force-recreate nexus-main
|
|
echo "Nexus deployed — HTTP :8080, WS :8765"
|