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
28 lines
794 B
Docker
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
|