Agents work on this repository in the agent-envs sandbox: a container whose only way out is an egress proxy with an allowlist, which also adds the Gitea bot token. docs/contributing/agents.md covers setting it up for Politrack (1Password item, .env, commit identity), what it can reach and its limits; AGENTS.md tells agents how to recognise the sandbox and behave in it. backend/tests/Dockerfile.debian gains a `sandbox` target: the agent-envs agent image plus the backend's dependencies from Debian packages, the same list as the PyPI-free test image (still the default target). The sandbox runs `pytest` without PyPI, which the owner's PC can't reach. A new invariant in AGENTS.md keeps that list in step with pyproject.toml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
25 lines
1.4 KiB
Docker
25 lines
1.4 KiB
Docker
# The Python dependencies from Debian packages, for networks where PyPI is unreachable. Lacks
|
|
# procrastinate and mcp (not packaged in Debian), so it runs the test suite and adapters, not the
|
|
# workers or the MCP server; ruff isn't packaged either.
|
|
#
|
|
# Two images share this package list; keep it in step with backend/pyproject.toml:
|
|
# - the test image, the default target: docs/contributing/testing.md ("Without PyPI access");
|
|
# - the agent sandbox image, target `sandbox` with BASE set to the agent-envs agent image, which
|
|
# agent-envs builds from this checkout: docs/contributing/agents.md.
|
|
ARG BASE=debian:trixie-slim
|
|
FROM ${BASE} AS deps
|
|
# eatmydata skips dpkg's disk syncs, which crawl on some Docker Desktop disks.
|
|
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends eatmydata >/dev/null \
|
|
&& eatmydata apt-get install -y -qq --no-install-recommends \
|
|
python3 python3-psycopg python3-psycopg-pool python3-pydantic-settings python3-fastapi python3-httpx \
|
|
python3-protego python3-feedparser python3-bs4 python3-slugify python3-rapidfuzz python3-typer \
|
|
python3-yaml python3-uvicorn python3-pytest python3-openpyxl ca-certificates >/dev/null \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Keeps the agent image's user, entrypoint and /workspace as they are.
|
|
FROM deps AS sandbox
|
|
|
|
FROM deps AS test
|
|
WORKDIR /app
|
|
ENV PYTHONPATH=/app PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
|