From 35d70dd525aea324e0e5237606b0c17c140541ea Mon Sep 17 00:00:00 2001 From: mokemoko Date: Sat, 4 Apr 2026 19:51:18 +0900 Subject: [PATCH 1/2] fix(docker): correct DB URL path and invalid COPY shell redirect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - REPOWISE_DB_URL used 3 slashes (sqlite+aiosqlite:///data/wiki.db), which SQLite interprets as a relative path "data/wiki.db" relative to the process CWD. Changed to 4 slashes (////data/wiki.db) so the path is the absolute /data/wiki.db that the volume mount expects. - Remove `2>/dev/null || true` from the COPY instruction — Dockerfile COPY does not support shell redirection; this silently failed to make the instruction optional and was dead syntax. Co-Authored-By: Claude Sonnet 4.6 --- docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index dc55b94..d995c15 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -48,13 +48,13 @@ RUN pip install --no-cache-dir ".[all]" # Copy built Next.js standalone output COPY --from=frontend-builder /app/.next/standalone /app/web COPY --from=frontend-builder /app/.next/static /app/web/.next/static -COPY --from=frontend-builder /app/public /app/web/public 2>/dev/null || true +COPY --from=frontend-builder /app/public /app/web/public # Data volume for .repowise directory VOLUME /data # Environment defaults -ENV REPOWISE_DB_URL=sqlite+aiosqlite:///data/wiki.db +ENV REPOWISE_DB_URL=sqlite+aiosqlite:////data/wiki.db ENV REPOWISE_EMBEDDER=mock ENV PORT_BACKEND=7337 ENV PORT_FRONTEND=3000 From ebec3458e1bf5de8470813c479b510d7280cad39 Mon Sep 17 00:00:00 2001 From: mokemoko Date: Sat, 4 Apr 2026 19:57:28 +0900 Subject: [PATCH 2/2] fix(docker): fix build context, DB URL path, and stale repo references - Dockerfile header comment: update build command to use -f docker/Dockerfile - docker-compose.yml: set build context to project root (context: .., dockerfile: docker/Dockerfile) so COPY paths to packages/ resolve correctly; also fix REPOWISE_DB_URL to use 4 slashes (absolute /data/wiki.db path) - docker/README.md: update build command and fix default DB URL in table - docs/QUICKSTART.md, docs/USER_GUIDE.md: replace remote-URL docker build with git clone + local build (-f docker/Dockerfile), update repo URL from RaghavChamadiya/repowise to repowise-dev/repowise, add -f flag to docker compose command Co-Authored-By: Claude Sonnet 4.6 --- docker/Dockerfile | 2 +- docker/README.md | 5 +++-- docker/docker-compose.yml | 6 ++++-- docs/QUICKSTART.md | 4 +++- docs/USER_GUIDE.md | 9 ++++++--- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index d995c15..eebd017 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,7 +2,7 @@ # repowise — multi-stage Docker build (backend + frontend) # ============================================================================= # Usage: -# docker build -t repowise . +# docker build -t repowise -f docker/Dockerfile . # docker run -p 7337:7337 -p 3000:3000 -v /path/to/repo/.repowise:/data -e GEMINI_API_KEY=... repowise # ============================================================================= diff --git a/docker/README.md b/docker/README.md index 5a7e15a..031f5a3 100644 --- a/docker/README.md +++ b/docker/README.md @@ -10,7 +10,8 @@ Run the full repowise stack (API + Web UI) in a single container. ## Quick Start ```bash -docker build -t repowise . +# Run from the project root +docker build -t repowise -f docker/Dockerfile . # Run with a mounted .repowise directory docker run -p 7337:7337 -p 3000:3000 \ @@ -36,7 +37,7 @@ docker compose up | Variable | Default | Description | |----------|---------|-------------| -| `REPOWISE_DB_URL` | `sqlite+aiosqlite:///data/wiki.db` | Database URL | +| `REPOWISE_DB_URL` | `sqlite+aiosqlite:////data/wiki.db` | Database URL | | `REPOWISE_EMBEDDER` | `mock` | Embedder: `gemini`, `openai`, `mock` | | `ANTHROPIC_API_KEY` | — | Anthropic API key (for chat) | | `OPENAI_API_KEY` | — | OpenAI API key (for chat) | diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 3f5c0d4..5bf7916 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,6 +1,8 @@ services: repowise: - build: . + build: + context: .. + dockerfile: docker/Dockerfile ports: - "7337:7337" # API - "3000:3000" # Web UI @@ -8,7 +10,7 @@ services: # Mount the .repowise directory from your indexed repo - ${REPOWISE_DATA:-./data}:/data environment: - - REPOWISE_DB_URL=sqlite+aiosqlite:///data/wiki.db + - REPOWISE_DB_URL=sqlite+aiosqlite:////data/wiki.db - REPOWISE_EMBEDDER=${REPOWISE_EMBEDDER:-mock} # Set your LLM provider API key - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-} diff --git a/docs/QUICKSTART.md b/docs/QUICKSTART.md index 8d0d92b..7087cc4 100644 --- a/docs/QUICKSTART.md +++ b/docs/QUICKSTART.md @@ -110,7 +110,9 @@ To skip the web UI and only run the API: `repowise serve --no-ui` ### With Docker (no Node.js needed) ```bash -docker build -t repowise https://github.com/RaghavChamadiya/repowise.git +git clone https://github.com/repowise-dev/repowise.git +cd repowise +docker build -t repowise -f docker/Dockerfile . docker run -p 7337:7337 -p 3000:3000 \ -v /path/to/your-repo/.repowise:/data \ diff --git a/docs/USER_GUIDE.md b/docs/USER_GUIDE.md index eb5cc24..8fc0850 100644 --- a/docs/USER_GUIDE.md +++ b/docs/USER_GUIDE.md @@ -565,8 +565,11 @@ On first run, the pre-built frontend is downloaded (~50 MB) and cached in `~/.re ### Docker (no Node.js needed) ```bash +git clone https://github.com/repowise-dev/repowise.git +cd repowise + # Build the image (one-time) -docker build -t repowise https://github.com/RaghavChamadiya/repowise.git +docker build -t repowise -f docker/Dockerfile . # Run with your indexed repo's .repowise directory docker run -p 7337:7337 -p 3000:3000 \ @@ -579,11 +582,11 @@ docker run -p 7337:7337 -p 3000:3000 \ Or with docker compose: ```bash -git clone https://github.com/RaghavChamadiya/repowise.git +git clone https://github.com/repowise-dev/repowise.git cd repowise export REPOWISE_DATA=/path/to/your-repo/.repowise export GEMINI_API_KEY=your-key -docker compose up +docker compose -f docker/docker-compose.yml up ``` Open **http://localhost:3000** for the Web UI, **http://localhost:7337** for the API.