diff --git a/docker/Dockerfile b/docker/Dockerfile index dc55b94..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 # ============================================================================= @@ -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 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.