Files
the-nexus/deploy.sh
Timmy 0e32027bb4
Some checks failed
CI / test (pull_request) Failing after 51s
Review Approval Gate / verify-review (pull_request) Failing after 7s
CI / validate (pull_request) Failing after 50s
feat(#1339): Deploy Nexus to proper URL for preview
ES module imports fail via file:// or raw Forge URLs (CORS +
missing Content-Type headers). boot.js detects this and warns users.

Three deployment options:
  - ./preview.sh — local Python server, correct MIME types
  - docker compose up nexus-preview — nginx on :8080 + WS proxy
  - Push to main — GitHub Pages auto-deploy

Fixes #1339
2026-04-13 21:16:49 -04:00

27 lines
898 B
Bash
Executable File

#!/usr/bin/env bash
# deploy.sh — Nexus environment
# ./deploy.sh — nexus-main (port 8765)
# ./deploy.sh staging — nexus-staging (port 8766)
# ./deploy.sh preview — static preview (port 8080)
# ./deploy.sh full — preview + backend
set -euo pipefail
SERVICE="${1:-nexus-main}"
case "$SERVICE" in
staging) SERVICE="nexus-staging" ;;
main) SERVICE="nexus-main" ;;
preview)
echo "==> Preview on http://localhost:8080"
docker compose build nexus-preview
docker compose up -d --force-recreate nexus-preview
exit 0 ;;
full)
echo "==> Full stack (preview + backend)"
docker compose build nexus-preview nexus-backend
docker compose up -d --force-recreate nexus-preview nexus-backend
exit 0 ;;
esac
echo "==> Deploying $SERVICE"
docker compose build "$SERVICE"
docker compose up -d --force-recreate "$SERVICE"
echo "==> Done: $SERVICE"