22 lines
643 B
Docker

# poller/Dockerfile (local file poller, no Splunk)
FROM python:3.12-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl \
&& rm -rf /var/lib/apt/lists/*
# minimal deps
COPY poller/requirements.txt ./requirements.txt
RUN python -m pip install --upgrade pip setuptools wheel \
&& pip install --no-cache-dir -r requirements.txt
COPY poller/file_poller.py .
ENV PYTHONUNBUFFERED=1
# default inputs folder (mounted by compose) and local API endpoint
ENV IN_DIR=/app/in
ENV TARGET_URL=http://agent-api:8080/ingest
ENV BATCH_MAX=1000
ENV SLEEP_SEC=2.0
CMD ["python", "-u", "file_poller.py"]