build: pin payments to version-15 + stage apps in deploy.sh erpnext

Two build fixes surfaced while shipping the set-password rename:

1. erpnext/Dockerfile cloned frappe/payments unpinned; its default branch now
   requires Python >=3.14 while frappe/erpnext:v15 ships 3.11, so the image
   build failed with 'Package payments requires a different Python'. Pin the
   clone to --branch version-15.

2. deploy.sh built the erpnext image without first staging the custom Frappe
   apps into the build context (erpnext/build.sh). That meant a baked-code
   change could silently ship stale code. Stage apps when erpnext is built.
This commit is contained in:
justin 2026-06-02 23:13:01 -05:00
parent 5c1341e6a1
commit 00c960f5b5
2 changed files with 12 additions and 1 deletions

View file

@ -15,6 +15,13 @@ git pull origin main
echo ""
echo "=== Building: $SERVICES ==="
# ERPNext bakes the custom Frappe apps into its image, so they must be staged
# into the build context (erpnext/<app>/) from the repo first. Without this,
# `docker compose build erpnext` would use stale app copies and silently ship
# old code (e.g. the set-password controller rename would never take effect).
case " $SERVICES " in
*" erpnext "*) echo "--- staging custom Frappe apps ---"; bash erpnext/build.sh ;;
esac
docker compose build $SERVICES
echo ""

View file

@ -17,7 +17,11 @@ COPY --chown=frappe:frappe frappe_ca_registry/ apps/frappe_ca_registry/
COPY --chown=frappe:frappe performancewest_erpnext/ apps/performancewest_erpnext/
# Install the payments app (not in base image) + all custom apps
RUN git clone --depth=1 https://github.com/frappe/payments.git apps/payments \
# Pin payments to the version-15 branch. The default branch now requires
# Python >=3.14, but the frappe/erpnext:v15 base ships Python 3.11, so an
# unpinned clone breaks the build ("Package 'payments' requires a different
# Python: 3.11.6 not in '>=3.14'").
RUN git clone --depth=1 --branch version-15 https://github.com/frappe/payments.git apps/payments \
&& env/bin/pip install --quiet -e apps/payments \
&& env/bin/pip install --quiet -e apps/frappe_crypto \
&& env/bin/pip install --quiet -e apps/frappe_adyen \