Syncs locally-detected CrowdSec ban decisions to Bunny CDN Shield Access Lists. Excludes community blocklists (CAPI/lists) since Bunny Shield has its own managed threat feeds. - Polls CrowdSec LAPI for origin=crowdsec/cscli bans - Updates Bunny Shield custom Access List via PATCH API - Change detection via set comparison to skip unnecessary API calls - Exponential backoff retry on API failures - Graceful SIGTERM/SIGINT shutdown - Docker healthcheck support Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
15 lines
263 B
Docker
15 lines
263 B
Docker
FROM python:3.12-slim
|
|
|
|
RUN groupadd -r bouncer && useradd -r -g bouncer -s /sbin/nologin bouncer
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY bouncer.py .
|
|
|
|
USER bouncer
|
|
|
|
ENTRYPOINT ["python", "-u", "bouncer.py"]
|