Files
politics-tracking/backend/Dockerfile
T
Simon DiesenreiterandClaude Opus 5.5 9da5a1dc48 Politrack: track Austrian politicians from public sources
Initial import of Politrack, a self-hosted service that tracks Austrian
politicians from federal to municipal level - roles, votes, money flows,
statements, meetings, social media and legal proceedings - with every claim
linked to its sources.

- backend: FastAPI + Postgres/pgvector; adapter framework (fetch -> parse ->
  load -> enrich) with robots.txt/TDM-aware fetching, a raw-response archive
  for reparsing, and a claim/evidence model with corroboration
- sources: Parliament, Wikidata, EU Parliament/Commission, Council of
  Ministers, Rechnungshof party reports and donations, procurement, RTR media
  transparency, political ad libraries, WKStA, news feeds, Wikipedia edits,
  Bluesky, Mastodon, public Telegram channels, YouTube and X (official API)
- web: Next.js frontend in German and English with typed API client
- mcp: MCP server for AI agents and RAG
- docs: architecture, data model, sources, legal notes, Unraid deployment and
  contributor guides; Docker Compose setup for Unraid

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 19:47:14 +01:00

22 lines
679 B
Docker

FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1
WORKDIR /app
# Install dependencies first for better layer caching.
COPY pyproject.toml ./
RUN mkdir politrack && touch politrack/__init__.py && pip install -e . && rm -rf politrack
# Editable install keeps the package at /app/politrack, so migrations/ and
# config/ resolve relative to it.
COPY politrack ./politrack
COPY migrations ./migrations
COPY config ./config
# /data/raw holds the raw-response archive (mount a volume there).
RUN useradd --system --uid 1000 politrack && mkdir -p /data/raw && chown -R politrack /data
USER politrack
EXPOSE 8000 8001
CMD ["politrack", "api"]