Skip to content

armgit / AiSOC

Public Imported from GitHub
0

Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.

fix(demo): bake Next.js rewrite targets into web image at build time

Beenu Arora0f211a612769
diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile
index 12cc59358..cd4b36e40 100644
--- a/apps/web/Dockerfile
+++ b/apps/web/Dockerfile
@@ -20,6 +20,20 @@ COPY apps/web ./apps/web
ENV NEXT_TELEMETRY_DISABLED=1
+# ─── Build-time rewrite targets ─────────────────────────────────────────────
+# Next.js bakes rewrite destinations into .next/routes-manifest.json at
+# build time, so these args MUST be provided to docker build (e.g. via
+# `args:` in docker-compose.demo.yml's `web.build:` block) when targeting
+# anything other than a single-host localhost dev setup. Defaults match the
+# Compose stack's Docker DNS so a no-arg `docker build` still yields a
+# working image inside the demo network.
+ARG API_URL=http://api:8000
+ARG AGENTS_URL=http://agents:8084
+ARG REALTIME_URL=http://realtime:4000
+ENV API_URL=${API_URL}
+ENV AGENTS_URL=${AGENTS_URL}
+ENV REALTIME_URL=${REALTIME_URL}
+
# Use pnpm's default symlinked node_modules — same layout as local dev,
# so tsup/tsc bin shims resolve correctly inside each workspace package.
RUN pnpm install --no-frozen-lockfile
diff --git a/docker-compose.demo.yml b/docker-compose.demo.yml
index de39b50ae..89df9bc73 100644
--- a/docker-compose.demo.yml
+++ b/docker-compose.demo.yml
@@ -216,6 +216,14 @@ services:
build:
context: .
dockerfile: apps/web/Dockerfile
+ # Next.js bakes rewrite destinations into routes-manifest.json at
+ # `next build` time, not at `next start`. These args MUST match the
+ # Docker DNS hostnames the runtime environment resolves to, otherwise
+ # the proxy layer ECONNREFUSEs to localhost from inside the container.
+ args:
+ API_URL: http://api:8000
+ AGENTS_URL: http://agents:8084
+ REALTIME_URL: http://realtime:4000
container_name: aisoc-demo-web
pull_policy: missing
depends_on: