- core/Dockerfile: python:3.11-slim, instala requirements + modelo spaCy (en_core_web_sm para Presidio), corre como usuario `agent`, HEALTHCHECK sobre /health, CMD uvicorn :8000. - dashboard/Dockerfile: python:3.11-slim, usuario `dash`, HEALTHCHECK sobre /_stcore/health, CMD streamlit :8501 headless. - .dockerignore: excluye venv, caches, datos runtime, .env, specs/plans y tests. Ambos pasan `docker build --check` sin warnings. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
32 lines
843 B
Docker
32 lines
843 B
Docker
# syntax=docker/dockerfile:1.7
|
|
|
|
FROM python:3.11-slim
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
PIP_NO_CACHE_DIR=1
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY dashboard/requirements.txt /app/requirements.txt
|
|
RUN pip install -r /app/requirements.txt
|
|
|
|
COPY dashboard/src /app/src
|
|
ENV PYTHONPATH=/app/src
|
|
|
|
RUN useradd --create-home --shell /bin/bash dash && chown -R dash:dash /app
|
|
USER dash
|
|
|
|
EXPOSE 8501
|
|
|
|
HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=3 \
|
|
CMD curl -fsS http://localhost:8501/_stcore/health || exit 1
|
|
|
|
CMD ["streamlit", "run", "/app/src/agentforge_dashboard/app.py", \
|
|
"--server.address=0.0.0.0", "--server.port=8501", \
|
|
"--server.headless=true", "--browser.gatherUsageStats=false"]
|