Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 32 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,41 @@
# ── Build ──
FROM python:3.12-slim AS builder
FROM python:3.14-alpine3.23 AS builder

COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

ENV UV_LINK_MODE=copy

WORKDIR /app
COPY . .

RUN pip install --no-cache-dir uv && \
uv build --wheel
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --all-extras --no-install-project --no-dev

COPY pyproject.toml LICENSE README.md ./
COPY src/ ./src/

RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --all-extras --no-dev


# ── Runtime ──
FROM python:3.12-slim
FROM python:3.14-alpine3.23
LABEL org.opencontainers.image.description="CLI tool for syncing content to Open WebUI Knowledge Bases" \
org.opencontainers.image.source="https://github.com/open-webui/oikb" \
org.opencontainers.image.vendor="Open WebUI Inc." \
org.opencontainers.image.licenses="MIT"
ENV PYTHONUNBUFFERED=1

RUN apk add --no-cache ca-certificates \
&& addgroup -g 1000 appuser \
&& adduser -D -u 1000 -G appuser appuser

COPY --from=builder --chown=appuser:appuser /app /app

WORKDIR /app

LABEL org.opencontainers.image.source="https://github.com/open-webui/oikb"
LABEL org.opencontainers.image.description="CLI tool for syncing content to Open WebUI Knowledge Bases"
USER appuser

# Install oikb from the built wheel.
COPY --from=builder /app/dist/*.whl /tmp/
RUN pip install --no-cache-dir /tmp/*.whl && rm /tmp/*.whl
ENV PATH="/app/.venv/bin:$PATH"

# Sync source is mounted at /data by convention.
VOLUME ["/data"]
WORKDIR /data
EXPOSE 8080

ENTRYPOINT ["oikb"]
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,11 @@ services:
- open-webui
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health/ready"]
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:8080/health/ready"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
```

## 44 Connectors
Expand Down
4 changes: 3 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ services:
- open-webui
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health/ready"]
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:8080/health/ready"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s

volumes:
open-webui:
4 changes: 3 additions & 1 deletion docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -595,9 +595,11 @@ services:
- open-webui
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health/ready"]
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:8080/health/ready"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
```

### GitHub Actions
Expand Down