Files
the-nexus/Dockerfile.preview
Timmy 1d4abeac3e
Some checks failed
CI / test (pull_request) Failing after 45s
Review Approval Gate / verify-review (pull_request) Failing after 10s
CI / validate (pull_request) Failing after 51s
feat(#1339): Deploy Nexus to proper URL for preview
ES module imports fail when served via file:// or raw Forge URLs due
to CORS restrictions and missing Content-Type headers. This adds
three deployment options for proper preview hosting:

Options added:
  1. Local preview: ./preview.sh (Python HTTP server with correct MIME)
  2. Docker preview: docker compose up nexus-preview (nginx + WS proxy)
  3. GitHub Pages: .github/workflows/pages.yml auto-deploy on push

Files added:
  - Dockerfile.preview: nginx-based preview container
  - preview/nginx.conf: correct MIME types + WebSocket proxy to backend
  - preview.sh: Python one-liner preview server
  - PREVIEW.md: deployment documentation
  - .github/workflows/pages.yml: GitHub Pages CI/CD

Files modified:
  - docker-compose.yml: added nexus-preview + nexus-backend services
  - deploy.sh: added preview/full deployment modes

Fixes #1339
2026-04-13 20:55:11 -04:00

28 lines
794 B
Docker

FROM nginx:alpine
# Remove default nginx config
RUN rm /etc/nginx/conf.d/default.conf
# Copy our nginx config
COPY preview/nginx.conf /etc/nginx/conf.d/default.conf
# Copy static frontend assets
COPY index.html /usr/share/nginx/html/
COPY app.js /usr/share/nginx/html/
COPY style.css /usr/share/nginx/html/
COPY boot.js /usr/share/nginx/html/
COPY gofai_worker.js /usr/share/nginx/html/
COPY service-worker.js /usr/share/nginx/html/
COPY manifest.json /usr/share/nginx/html/
COPY robots.txt /usr/share/nginx/html/
COPY help.html /usr/share/nginx/html/
COPY portals.json /usr/share/nginx/html/
COPY vision.json /usr/share/nginx/html/
# Copy directories
COPY nexus/ /usr/share/nginx/html/nexus/
COPY icons/ /usr/share/nginx/html/icons/
COPY assets/ /usr/share/nginx/html/assets/
EXPOSE 8080