-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.allinone
More file actions
69 lines (60 loc) · 2.87 KB
/
Copy pathDockerfile.allinone
File metadata and controls
69 lines (60 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# ── All-in-one image: engine + bundled Postgres + viewer UI ──────────
#
# One `docker run` gives a fully working Vectorless: the retrieval engine,
# a Postgres instance bundled in the same container, and the local web UI.
# The only thing the user supplies is an LLM provider key.
#
# docker run -p 8080:8080 -p 7654:7654 \
# -e VLE_LLM_ANTHROPIC_API_KEY=<your GLM key> \
# hallelx2/vectorless:latest
# # → UI: http://localhost:8080
# # → API: http://localhost:7654
#
# Context: vectorless-engine/ directory.
# ── Build stage ──────────────────────────────────────────────────────
FROM golang:1.25-alpine AS build
RUN apk add --no-cache ca-certificates
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY cmd/ ./cmd/
COPY pkg/ ./pkg/
COPY internal/ ./internal/
ARG VERSION=dev
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -trimpath -ldflags="-s -w -X main.version=${VERSION}" \
-o /bin/engine ./cmd/engine
# ── Runtime stage: Postgres base + python + engine + viewer ──────────
FROM postgres:16-bookworm
RUN apt-get update \
&& apt-get install -y --no-install-recommends python3 ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /bin/engine /usr/local/bin/engine
COPY localapp/ /opt/vectorless-app/
COPY deploy/allinone/entrypoint.sh /usr/local/bin/vl-entrypoint.sh
RUN chmod +x /usr/local/bin/vl-entrypoint.sh
# Bundled Postgres credentials — must match engine --local's expected DSN
# (postgres://vectorless:vectorless@localhost:5432/vectorless).
ENV POSTGRES_USER=vectorless \
POSTGRES_PASSWORD=vectorless \
POSTGRES_DB=vectorless
# Engine defaults: local mode, minimal ingest (fast, queryable in seconds),
# document bytes under /data (mount a volume here to persist), and GLM via
# z.ai's Anthropic-compatible gateway out of the box. Override any of these
# with -e at runtime; the user still supplies VLE_LLM_ANTHROPIC_API_KEY.
ENV VLE_INGEST_MODE=minimal \
VLE_STORAGE_LOCAL_ROOT=/data/documents \
VLE_LLM_DRIVER=anthropic \
VLE_LLM_ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic/v1 \
VLE_LLM_ANTHROPIC_MODEL=glm-4.6 \
VIEWER_PORT=8080 \
ENGINE_URL=http://localhost:7654 \
HOST=0.0.0.0
EXPOSE 8080 7654
VOLUME ["/data", "/var/lib/postgresql/data"]
ENTRYPOINT ["/usr/local/bin/vl-entrypoint.sh"]
LABEL org.opencontainers.image.title="vectorless (all-in-one)"
LABEL org.opencontainers.image.description="Vectorless retrieval engine + bundled Postgres + web UI in one container. Reasoning-based document retrieval — no chunking, no embeddings, no vector DB."
LABEL org.opencontainers.image.source="https://github.com/hallelx2/vectorless-engine"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.vendor="Vectorless"