Dockerfile
Rama main · réplica de lectura del repositorio original.
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
BIND_HOST=0.0.0.0 \
PORT=8000
WORKDIR /app
COPY pyproject.toml README.md LICENSE requirements.lock ./
COPY src ./src
COPY docs ./docs
COPY man ./man
# The container needs boto3 for S3 packs and DynamoDB, not the CDK.
RUN pip install --no-cache-dir ".[aws]" \
&& useradd --create-home --uid 10001 --shell /usr/sbin/nologin baddecisions
USER baddecisions
EXPOSE 8000
CMD ["uvicorn", "bad_decisions.api:create_app", "--factory", "--host", "0.0.0.0", "--port", "8000", "--proxy-headers", "--forwarded-allow-ips=*"]