Initial commit: RIPE CIDR/FQDN collector

Collector daemon, FastAPI server (addresses, diff, collect, sources),
SQLite storage with change journal, Docker Compose deployment,
tests, documentation and project rules.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
ayurishchevandClaude Sonnet 5 committed 2026-09-21 07:29:38 +03:00
commit bcf8156085
45 files changed
+3134

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
RIPE_DATA_DIR=/data
WORKDIR /app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY api_server.py cidr_collector.py collector_daemon.py db.py formatters.py storage.py healthcheck.py ./
# Без root; том /data создаётся с владельцем ripe (именованный том наследует его при первом создании)
RUN useradd --system --uid 10001 --no-create-home ripe \
&& mkdir /data && chown ripe /data
USER ripe
VOLUME /data
EXPOSE 8000
# exec-форма: SIGTERM доходит до процесса. Сборщик переопределяет команду в docker-compose.yml
CMD ["uvicorn", "api_server:app", "--host", "0.0.0.0", "--port", "8000"]