From e8d5e87853b39408f920c20f3875a1b32d689771 Mon Sep 17 00:00:00 2001 From: cloudneutral Date: Mon, 15 Dec 2025 08:05:38 +0800 Subject: [PATCH] Align editor proxy with external editor service --- .github/workflows/build-images.yml | 9 ++++++--- Makefile | 5 +++-- next.config.mjs | 4 ++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml index 67951c0..ef4a1b4 100644 --- a/.github/workflows/build-images.yml +++ b/.github/workflows/build-images.yml @@ -66,6 +66,9 @@ jobs: build: runs-on: ubuntu-latest + outputs: + dashboard-digest: ${{ steps.build.outputs.digest }} + strategy: matrix: service: @@ -169,7 +172,7 @@ jobs: # ------------------------------------------------------------- - uses: anchore/sbom-action@v0 with: - image: ${{ env.REGISTRY }}/${{ env.ORG }}/${{ matrix.service.name }}@${{ steps.build.outputs.digest }} + image: ${{ env.REGISTRY }}/${{ env.ORG }}/${{ matrix.service.name }}@${{ needs.build.outputs.dashboard-digest }} output-file: sbom.spdx.json - uses: actions/upload-artifact@v4 @@ -182,7 +185,7 @@ jobs: # ------------------------------------------------------------- - uses: aquasecurity/trivy-action@0.28.0 with: - image-ref: ${{ env.REGISTRY }}/${{ env.ORG }}/${{ matrix.service.name }}@${{ steps.build.outputs.digest }} + image-ref: ${{ env.REGISTRY }}/${{ env.ORG }}/${{ matrix.service.name }}@${{ needs.build.outputs.dashboard-digest }} severity: HIGH,CRITICAL exit-code: '1' @@ -197,5 +200,5 @@ jobs: env: COSIGN_EXPERIMENTAL: "true" run: | - IMG=${{ env.REGISTRY }}/${{ env.ORG }}/${{ matrix.service.name }}@${{ steps.build.outputs.digest }} + IMG=${{ env.REGISTRY }}/${{ env.ORG }}/${{ matrix.service.name }}@${{ needs.build.outputs.dashboard-digest }} cosign sign --yes "$IMG" diff --git a/Makefile b/Makefile index 27ba416..d5b5f28 100644 --- a/Makefile +++ b/Makefile @@ -59,8 +59,9 @@ ensure-deps: fi dev: ensure-deps - @echo "🚀 Starting Next.js dev server (dashboard)..." - yarn dev -p 3001 + @echo "🚀 Starting Next.js dev server (dashboard)..." + @echo "â„šī¸ /editor is proxied to an external NeuraPress front-end at http://localhost:4000." + yarn dev -p 3001 start: @echo "🚀 Starting Next.js dev server (dashboard) in background..." diff --git a/next.config.mjs b/next.config.mjs index a9e01e0..d616bfb 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -96,6 +96,10 @@ export async function redirects() { export async function rewrites() { return [ + { + source: '/editor', + destination: 'http://localhost:4000', + }, { source: '/editor/:path*', destination: 'http://localhost:4000/:path*',