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
27 lines
898 B
Bash
Executable File
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"
|