Skip to content

Commit b98334a

Browse files
mokemokoclaude
andauthored
fix(docker): fix build context, DB URL absolute path, and stale repo references
* fix(docker): correct DB URL path and invalid COPY shell redirect - 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 <noreply@anthropic.com> * 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 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 85991d0 commit b98334a

5 files changed

Lines changed: 19 additions & 11 deletions

File tree

docker/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# repowise — multi-stage Docker build (backend + frontend)
33
# =============================================================================
44
# Usage:
5-
# docker build -t repowise .
5+
# docker build -t repowise -f docker/Dockerfile .
66
# docker run -p 7337:7337 -p 3000:3000 -v /path/to/repo/.repowise:/data -e GEMINI_API_KEY=... repowise
77
# =============================================================================
88

@@ -48,13 +48,13 @@ RUN pip install --no-cache-dir ".[all]"
4848
# Copy built Next.js standalone output
4949
COPY --from=frontend-builder /app/.next/standalone /app/web
5050
COPY --from=frontend-builder /app/.next/static /app/web/.next/static
51-
COPY --from=frontend-builder /app/public /app/web/public 2>/dev/null || true
51+
COPY --from=frontend-builder /app/public /app/web/public
5252

5353
# Data volume for .repowise directory
5454
VOLUME /data
5555

5656
# Environment defaults
57-
ENV REPOWISE_DB_URL=sqlite+aiosqlite:///data/wiki.db
57+
ENV REPOWISE_DB_URL=sqlite+aiosqlite:////data/wiki.db
5858
ENV REPOWISE_EMBEDDER=mock
5959
ENV PORT_BACKEND=7337
6060
ENV PORT_FRONTEND=3000

docker/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ Run the full repowise stack (API + Web UI) in a single container.
1010
## Quick Start
1111

1212
```bash
13-
docker build -t repowise .
13+
# Run from the project root
14+
docker build -t repowise -f docker/Dockerfile .
1415

1516
# Run with a mounted .repowise directory
1617
docker run -p 7337:7337 -p 3000:3000 \
@@ -36,7 +37,7 @@ docker compose up
3637

3738
| Variable | Default | Description |
3839
|----------|---------|-------------|
39-
| `REPOWISE_DB_URL` | `sqlite+aiosqlite:///data/wiki.db` | Database URL |
40+
| `REPOWISE_DB_URL` | `sqlite+aiosqlite:////data/wiki.db` | Database URL |
4041
| `REPOWISE_EMBEDDER` | `mock` | Embedder: `gemini`, `openai`, `mock` |
4142
| `ANTHROPIC_API_KEY` || Anthropic API key (for chat) |
4243
| `OPENAI_API_KEY` || OpenAI API key (for chat) |

docker/docker-compose.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
services:
22
repowise:
3-
build: .
3+
build:
4+
context: ..
5+
dockerfile: docker/Dockerfile
46
ports:
57
- "7337:7337" # API
68
- "3000:3000" # Web UI
79
volumes:
810
# Mount the .repowise directory from your indexed repo
911
- ${REPOWISE_DATA:-./data}:/data
1012
environment:
11-
- REPOWISE_DB_URL=sqlite+aiosqlite:///data/wiki.db
13+
- REPOWISE_DB_URL=sqlite+aiosqlite:////data/wiki.db
1214
- REPOWISE_EMBEDDER=${REPOWISE_EMBEDDER:-mock}
1315
# Set your LLM provider API key
1416
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}

docs/QUICKSTART.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ To skip the web UI and only run the API: `repowise serve --no-ui`
110110
### With Docker (no Node.js needed)
111111

112112
```bash
113-
docker build -t repowise https://github.com/RaghavChamadiya/repowise.git
113+
git clone https://github.com/repowise-dev/repowise.git
114+
cd repowise
115+
docker build -t repowise -f docker/Dockerfile .
114116

115117
docker run -p 7337:7337 -p 3000:3000 \
116118
-v /path/to/your-repo/.repowise:/data \

docs/USER_GUIDE.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -565,8 +565,11 @@ On first run, the pre-built frontend is downloaded (~50 MB) and cached in `~/.re
565565
### Docker (no Node.js needed)
566566

567567
```bash
568+
git clone https://github.com/repowise-dev/repowise.git
569+
cd repowise
570+
568571
# Build the image (one-time)
569-
docker build -t repowise https://github.com/RaghavChamadiya/repowise.git
572+
docker build -t repowise -f docker/Dockerfile .
570573

571574
# Run with your indexed repo's .repowise directory
572575
docker run -p 7337:7337 -p 3000:3000 \
@@ -579,11 +582,11 @@ docker run -p 7337:7337 -p 3000:3000 \
579582
Or with docker compose:
580583

581584
```bash
582-
git clone https://github.com/RaghavChamadiya/repowise.git
585+
git clone https://github.com/repowise-dev/repowise.git
583586
cd repowise
584587
export REPOWISE_DATA=/path/to/your-repo/.repowise
585588
export GEMINI_API_KEY=your-key
586-
docker compose up
589+
docker compose -f docker/docker-compose.yml up
587590
```
588591

589592
Open **http://localhost:3000** for the Web UI, **http://localhost:7337** for the API.

0 commit comments

Comments
 (0)