-
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.83 KB
/
Copy pathDockerfile
File metadata and controls
48 lines (39 loc) · 1.83 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-calendar 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. Everything is pure/offline (holidays + python-dateutil);
# no network, no model downloads, no persistent state.
# 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-calendar
LABEL org.opencontainers.image.title="vgi-calendar" \
org.opencontainers.image.description="Holiday, business-day, and recurrence calendar math for DuckDB 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. The wheel packages
# `vgi_calendar` (catalog + CalendarWorker + main), so the image is self-contained.
COPY pyproject.toml README.md LICENSE ./
COPY vgi_calendar ./vgi_calendar
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"]