fix(docker): use python:3.13-slim base image, switch hypercorn → granian
Some checks failed
CI / test-cli (push) Failing after 7s
CI / test-sqlmesh (push) Failing after 6s
CI / test-web (push) Failing after 6s
CI / tag (push) Has been skipped

This commit is contained in:
Deeman
2026-02-28 23:52:00 +01:00
parent d6bd5d927c
commit b5fae9d528
3 changed files with 57 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ RUN tailwindcss -i ./web/src/beanflows/static/css/input.css \
# Build stage
FROM python:3.12-slim AS build
FROM python:3.13-slim AS build
COPY --from=ghcr.io/astral-sh/uv:0.8 /uv /uvx /bin/
WORKDIR /app
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
@@ -20,7 +20,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --no-dev --frozen --package beanflows
# Runtime stage
FROM python:3.12-slim AS runtime
FROM python:3.13-slim AS runtime
ENV PATH="/app/.venv/bin:$PATH"
RUN useradd -m -u 1000 appuser
WORKDIR /app
@@ -31,4 +31,4 @@ USER appuser
ENV PYTHONUNBUFFERED=1
ENV DATABASE_PATH=/app/data/app.db
EXPOSE 5000
CMD ["hypercorn", "beanflows.app:app", "--bind", "0.0.0.0:5000", "--workers", "1"]
CMD ["granian", "--interface", "asgi", "--host", "0.0.0.0", "--port", "5000", "--workers", "1", "beanflows.app:app"]