Skip to main content

Installation

Insurance Broker Core installs like any other Frappe app. The app starts as installed_but_inactive: posting and sensitive functions are not enabled by installation. Activation is a separate operator decision, described in First steps and activation.

Take a complete site backup first (see Operations). Replace the uppercase placeholders (for example SITE_NAME, BENCH_PATH, REPOSITORY_URL) in the commands below with your own values.

Install with bench​

cd BENCH_PATH
bench get-app REPOSITORY_URL/insurance-broker-core.git
bench --site SITE_NAME install-app insurance_broker_core
bench --site SITE_NAME migrate
bench --site SITE_NAME clear-cache
bench --site SITE_NAME list-apps

insurance_broker_core must appear in the output of list-apps.

Install from the app pack​

The customer-delivery variant is the app pack jhf-ibc-pack-git-SHA12.tar.gz. It keeps the repository layout and is installed as a directory, not as a wheel:

mkdir jhf-ibc-pack
tar -xzf jhf-ibc-pack-git-SHA12.tar.gz -C jhf-ibc-pack
bench get-app insurance_broker_core ./jhf-ibc-pack

A wheel is not a supported install path. The code loads the contracts/ files and the evidence-bundle scripts relative to the repository root, and a wheel does not contain them.

The pack contains only the app (AGPL-3.0-or-later, ANYFER GmbH). ERPNext is not part of it; it comes as the vendor frappe/erpnext image, pinned by digest in the source repository (see Requirements).

Multi-container benches​

For a long-running multi-container bench (backend, scheduler, queue workers, websocket), the delivery shape is:

  1. Use the vendor frappe/erpnext image, pinned by digest, as the base of every runtime.
  2. Add the app pack to every image so that backend, scheduler, and each queue worker contain the same app code.
  3. Recreate all runtimes from the same new image, then run the install commands above once against the site.
  4. Verify each runtime separately (next section).

The project's own deploy stack in the source repository (under deploy/pilot/) is an internal development and acceptance surface. It is not a customer image and is not distributed.

Verify every runtime​

With a shared sites/ volume and container-local apps/ directories, the file sites/apps.txt is valid only relative to the runtime that reads it. Run the registry check in the backend, in the scheduler, and in every queue worker:

python apps/insurance_broker_core/scripts/verify_bench_app_registry.py \
--check --bench . --runtime-id "$HOSTNAME"

A PASS applies only to the named runtime. A backend PASS is not a scheduler or worker PASS. If a runtime lacks the app directory or the importable Python package, the shared apps.txt entry is orphaned for exactly that runtime.

What the install hooks do​

  • Language defaults. On a fresh standalone site, the install and migrate hooks set language=en, date_format=yyyy-mm-dd, time_format=HH:mm:ss, and time_zone=UTC, but only where a value is missing. Existing values are never overwritten.
  • Stale module maps. Before the DocType sync, the install hook discards the site and bench module maps and rebuilds them from the current bench. If the hook still fails, it removes insurance_broker_core from installed_apps before passing the error on, so the site stays migratable and the next attempt is not a repair of a half-installed app.

Recovery after IBC-INSTALL-MODULES-001​

bench --site SITE_NAME clear-cache
bench --site SITE_NAME migrate
bench --site SITE_NAME install-app insurance_broker_core

Editing installed_apps, apps.txt, or database tables by hand is not a supported recovery path.

Next step​

Continue with First steps and activation, or see Troubleshooting and FAQ if the app does not show up.