From 3504945367500e66fa35202b90249b2d65a2ada8 Mon Sep 17 00:00:00 2001 From: "kritik.b" Date: Thu, 16 Apr 2026 01:04:15 +0530 Subject: [PATCH] fix: update docker references --- .env.example | 4 ++-- Dockerfile | 2 ++ README.md | 8 ++++---- docker-compose.yaml | 10 ++++++++-- docker-server.mjs | 2 ++ 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.env.example b/.env.example index 9631b4c70..b52d05ae1 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,3 @@ -IMAGE_NAME=ghcr.io/abhigyanpatwari/gitnexus-web:latest -CONTAINER_NAME=gitnexus-web +IMAGE_NAME=ghcr.io/abhigyanpatwari/gitnexus:latest +CONTAINER_NAME=gitnexus HOST_PORT=4173 diff --git a/Dockerfile b/Dockerfile index 01d206d6c..25d411627 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,8 @@ RUN npm run build --prefix gitnexus-web FROM node:20-bookworm-slim AS runtime +RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/* + WORKDIR /app COPY --from=builder /app/gitnexus-web/dist ./dist diff --git a/README.md b/README.md index ae05b32ab..d61fc54d5 100644 --- a/README.md +++ b/README.md @@ -339,9 +339,9 @@ npm run dev ```bash docker run --rm \ - --name gitnexus-web \ + --name gitnexus \ -p 4173:4173 \ - ghcr.io/abhigyanpatwari/gitnexus-web:latest + ghcr.io/abhigyanpatwari/gitnexus:latest ``` Or with Docker Compose: @@ -361,7 +361,7 @@ set +a Docker files: -- [Dockerfile](Dockerfile) is the source for the published `gitnexus-web` image. It builds `gitnexus-shared` and `gitnexus-web`, then runs the app directly with Vite preview. +- [Dockerfile](Dockerfile) is the source for the published `gitnexus` image. It builds `gitnexus-shared` and `gitnexus-web`, then serves the production frontend. - [docker-compose.yaml](docker-compose.yaml) starts the published image with Docker Compose. - [.env.example](.env.example) sets the image name, container name, and exposed port for the example commands. @@ -369,7 +369,7 @@ Notes: - The published image serves the production frontend only. It does not start `gitnexus serve`. - In backend mode, the app still defaults to `http://localhost:4747` unless you change the server URL in the UI. -- If you do not want an env file, the defaults are `ghcr.io/abhigyanpatwari/gitnexus-web:latest`, container name `gitnexus-web`, and port `4173`. +- If you do not want an env file, the defaults are `ghcr.io/abhigyanpatwari/gitnexus:latest`, container name `gitnexus`, and port `4173`. The web UI uses the same indexing pipeline as the CLI but runs entirely in WebAssembly (Tree-sitter WASM, LadybugDB WASM, in-browser embeddings). It's great for quick exploration but limited by browser memory for larger repos. diff --git a/docker-compose.yaml b/docker-compose.yaml index b0fba541c..145b045dd 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,7 +1,13 @@ services: - gitnexus-web: + gitnexus: image: ${IMAGE_NAME:-ghcr.io/abhigyanpatwari/gitnexus:latest} - container_name: ${CONTAINER_NAME:-gitnexus-web} + container_name: ${CONTAINER_NAME:-gitnexus} ports: - "${HOST_PORT:-4173}:4173" restart: unless-stopped + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:4173/"] + interval: 30s + timeout: 5s + retries: 3 + start_period: 10s diff --git a/docker-server.mjs b/docker-server.mjs index 911488ce0..bcc1c8636 100644 --- a/docker-server.mjs +++ b/docker-server.mjs @@ -54,6 +54,8 @@ const server = createServer(async (req, res) => { res.writeHead(200, { 'Cache-Control': filePath.includes('/assets/') ? 'public, max-age=31536000, immutable' : 'no-cache', 'Content-Type': contentTypes[extname(filePath)] || 'application/octet-stream', + 'Cross-Origin-Opener-Policy': 'same-origin', + 'Cross-Origin-Embedder-Policy': 'require-corp', }); createReadStream(filePath).pipe(res); } catch (error) {