fix(docker): install [sftp] extra so paramiko is in the runtime image

The backend Dockerfile only installed the [sqlcipher] extra, so
paramiko wasn't on the path inside the container. SP25 + SP26's
real-mode SFTP client needs paramiko to connect to the Gainwell
MFT — the scheduler tick surfaced this as
'No module named paramiko' on the very first /api/admin/scheduler/tick
against the dzinesco clearhouse with stub=false.

Install both extras ([sqlcipher,sftp]) in builder and runtime stages.
This commit is contained in:
tyler
2026-06-24 18:20:22 -06:00
parent b7be9f38bc
commit 9cb0311544
+5 -2
View File
@@ -35,7 +35,10 @@ COPY pyproject.toml ./
# the cached wheel metadata when the name+version matches. See git # the cached wheel metadata when the name+version matches. See git
# history on this file for the long version. # history on this file for the long version.
COPY src/ ./src/ COPY src/ ./src/
RUN pip wheel --no-cache-dir --wheel-dir /wheels '.[sqlcipher]' # Install the sftp extra alongside sqlcipher so the real-mode SFTP
# client (paramiko) is available inside the container — required by
# SP25 + SP26 for live Gainwell MFT polling.
RUN pip wheel --no-cache-dir --wheel-dir /wheels '.[sqlcipher,sftp]'
# ---------- runtime ---------- # ---------- runtime ----------
FROM python:3.11-slim-bookworm FROM python:3.11-slim-bookworm
@@ -53,7 +56,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
WORKDIR /app WORKDIR /app
COPY --from=builder /wheels /wheels COPY --from=builder /wheels /wheels
RUN pip install --no-cache-dir --no-index --find-links /wheels 'cyclone[sqlcipher]' \ RUN pip install --no-cache-dir --no-index --find-links /wheels 'cyclone[sqlcipher,sftp]' \
&& rm -rf /wheels && rm -rf /wheels
# NOTE: we deliberately do NOT drop privileges to the `cyclone` user. # NOTE: we deliberately do NOT drop privileges to the `cyclone` user.