diff --git a/services/bot-detector/bot_detector/Dockerfile b/services/bot-detector/bot_detector/Dockerfile index 43c25ad..7a9af2f 100644 --- a/services/bot-detector/bot_detector/Dockerfile +++ b/services/bot-detector/bot_detector/Dockerfile @@ -3,6 +3,9 @@ ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 WORKDIR /app +# Build deps for isotree (C++ extension) +RUN apt-get update && apt-get install -y --no-install-recommends g++ && rm -rf /var/lib/apt/lists/* + # Install shared package first COPY shared/python/ja4_common/ /app/shared/ja4_common/ RUN pip install --no-cache-dir /app/shared/ja4_common/ diff --git a/services/bot-detector/bot_detector/Dockerfile.tests b/services/bot-detector/bot_detector/Dockerfile.tests index d23b8e0..babcf43 100644 --- a/services/bot-detector/bot_detector/Dockerfile.tests +++ b/services/bot-detector/bot_detector/Dockerfile.tests @@ -1,5 +1,7 @@ FROM python:3.11-slim WORKDIR /app +# Build deps for isotree (C++ extension) +RUN apt-get update && apt-get install -y --no-install-recommends g++ && rm -rf /var/lib/apt/lists/* COPY shared/python/ja4_common/ /app/shared/ja4_common/ RUN pip install --no-cache-dir /app/shared/ja4_common/ COPY services/bot-detector/bot_detector/requirements.txt . diff --git a/services/dashboard/Dockerfile.tests b/services/dashboard/Dockerfile.tests new file mode 100644 index 0000000..c4a8613 --- /dev/null +++ b/services/dashboard/Dockerfile.tests @@ -0,0 +1,8 @@ +FROM python:3.11-slim +WORKDIR /app +COPY services/dashboard/requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt +RUN pip install --no-cache-dir pytest httpx +COPY services/dashboard/backend/ ./backend/ +# Smoke test: verify the app imports and starts correctly +CMD ["python", "-c", "from backend.main import app; print(f'FastAPI app loaded: {len(app.routes)} routes'); print('OK')"]