-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (39 loc) · 1.8 KB
/
Copy pathDockerfile
File metadata and controls
48 lines (39 loc) · 1.8 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
# Copyright 2026 Query Farm LLC - https://query.farm
#
# Single image serving BOTH transports of the vgi-search worker:
# docker run ... IMG -> HTTP server on $PORT (default 8000; /health, VGI RPC)
# docker run -i ... IMG stdio -> stdio worker DuckDB spawns on-host
# See docker-entrypoint.sh. vgi-search is a stateless egress connector (no local
# state / no /data volume); provider API keys are supplied at query time via a VGI
# secret (one per keyed provider) or *_API_KEY env vars. DuckDuckGo works key-free.
# syntax=docker/dockerfile:1
FROM python:3.13-slim
ARG VERSION=0.0.0
ARG GIT_COMMIT=unknown
ARG SOURCE_URL=https://github.com/Query-farm/vgi-search
LABEL org.opencontainers.image.title="vgi-search" \
org.opencontainers.image.description="Unified web search as DuckDB SQL functions via VGI (stdio + HTTP)" \
org.opencontainers.image.source="${SOURCE_URL}" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.revision="${GIT_COMMIT}" \
org.opencontainers.image.licenses="MIT" \
farm.query.vgi.transports='["http","stdio"]'
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PORT=8000
WORKDIR /app
# curl backs the HEALTHCHECK and the CI /health smoke.
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl \
&& rm -rf /var/lib/apt/lists/*
# Install the worker + HTTP-serving extra from the source tree.
COPY pyproject.toml README.md LICENSE ./
COPY vgi_search ./vgi_search
RUN pip install '.[serve]'
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=3s --start-period=8s \
CMD curl -fsS "http://localhost:${PORT}/health" || exit 1
ENTRYPOINT ["docker-entrypoint.sh"]