From 567b033c46b403395cbaa3ceacfbfc7054e4484d Mon Sep 17 00:00:00 2001 From: Ricardo Mancinas Date: Sat, 1 Aug 2026 02:07:22 -0700 Subject: [PATCH] fix(docker): re-import failed because the Access CLI tools were never installed The API image installed Alpine's `mdbtools` package, which ships only the shared library. The command-line tools that migration/extract.py actually shells out to -- `mdb-tables` and `mdb-export` -- are in the separate `mdbtools-utils` subpackage, so the build succeeded and the re-import in the "Operaciones" admin panel failed at run time with: RuntimeError: mdbtools not found on PATH (need mdb-tables and mdb-export) Install `mdbtools-utils` instead; it pulls the library in as a dependency. Co-Authored-By: Claude Opus 5 --- docker/api.Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docker/api.Dockerfile b/docker/api.Dockerfile index b7da029..8712a62 100644 --- a/docker/api.Dockerfile +++ b/docker/api.Dockerfile @@ -47,6 +47,13 @@ ENV NODE_ENV=production # That breaks the pre-migrate deploy backup AND the whole "Operaciones" admin # panel (backup, restore, sync, re-import all shell out to these binaries). # +# mdbtools-utils, NOT mdbtools. Alpine splits the project: `mdbtools` is the +# shared library only, and the command-line tools migration/extract.py shells out +# to (`mdb-tables`, `mdb-export`) are in the -utils subpackage. Installing the +# wrong one builds fine and fails at run time โ€” the re-import in the "Operaciones" +# panel dies with: +# RuntimeError: mdbtools not found on PATH (need mdb-tables and mdb-export) +# # tesseract-ocr + tesseract-ocr-data-spa + poppler-utils drive the statement # OCR intake (RECEIPT_CAPTURE_SPEC ยง2): poppler's `pdftoppm` rasterises each # scanned page and tesseract reads it, with the Spanish traineddata for the @@ -55,7 +62,7 @@ ENV NODE_ENV=production # dependency. If they are absent the API still boots โ€” the statements module # reports itself unavailable and only that feature is disabled โ€” but statement # ingest is the point of shipping them. -RUN apk add --no-cache python3 mdbtools mysql-client mariadb-connector-c openssl \ +RUN apk add --no-cache python3 mdbtools-utils mysql-client mariadb-connector-c openssl \ tesseract-ocr tesseract-ocr-data-spa poppler-utils \ && apk add --no-cache --virtual .pybuild python3-dev build-base \ && rm -rf /var/cache/apk/*