Skip to content

Services, Setup Modes & Infrastructure

Business M supports a combined application deployment and a deployment with separate domain services. Both can use PostgreSQL for business data, ledgers and event storage. Infrastructure requirements depend on the selected modules, workload, availability target and deployment package.

This guide describes the manifests on main reviewed on 19 November 2026. Check the chart or Compose package for the release you will install. For release and installation procedures, see the deployment guide.

Setup Application layout Infrastructure to provision Typical use
Local development Python API processes, Vite frontend and background workers on a workstation PostgreSQL, Valkey and NATS using local services or development Compose Developers changing Business M
Single VM with Compose, monolith Combined application API and Desk frontend, background worker and migration containers Linux VM, Docker Engine with Compose, PostgreSQL, Valkey, NATS, persistent volumes and HTTPS reverse proxy Pilot or deployment operated on one server
Single VM with Compose, macroservices Shell, separate domain APIs, domain workers and migration containers Same shared infrastructure with more application processes and memory Integration testing or a deployment needing separate service processes
Kubernetes, monolith Combined application Deployment with workers and migration Job Kubernetes cluster, Helm, ingress controller or Gateway, persistent storage and shared infrastructure Cluster operation with a combined application
Kubernetes, macroservices Shell and domain Deployments with workers and migration Job Same cluster facilities with capacity for all enabled service replicas Independent deployment and scaling of domain services
Debian package Application installed under /opt/business-m and started by systemd Linux host, database, cache, messaging, worker scheduling and HTTPS configuration Host-based installation managed by an operator

The Helm topology switch is mode: monolith or mode: macroservices. The tier setting controls the Business M feature tier separately. Ledger and event store choices also have their own settings. A deployment can therefore run macroservices with PostgreSQL-backed ledgers and events.

The current source tree includes the Business M shell, book-keeper and stock-keeper applications. Confirm availability of a released installer before planning a desktop installation. The Debian service unit starts the web application. Provision workers and scheduling for background processing as part of that installation.

Component Responsibility Deployment implications
Business M shell and core Desk frontend, authentication, user management and master data Combined with domains in monolith mode, separate shell API in macroservice mode
Finance Accounting, invoice processing, payments and financial workflows Has a domain API and worker in macroservice mode
WMS Warehouses, stock operations and distribution Has a domain API and worker in macroservice mode
People Personnel, HR and payroll Has a domain API and worker in macroservice mode
POS, m_pos Outlet and point-of-sale workflows Separate from WMS in macroservice mode, with its own API and worker
India, m_india Regional compliance and localization Current macroservice manifests include an API
Estate and Works, estate_works Civil works, contractor bills and quarters Current macroservice manifests include an API and worker
Helpdesk, m_helpdesk Incident intake, SLA escalation and CAB change requests Has an API and scheduled worker in macroservice mode. The Helm chart also creates a Helpdesk worker in monolith mode
Core and domain workers Events, asynchronous work, periodic processing and retries Include these processes in capacity estimates. Verify which worker or scheduler owns periodic jobs
PostgreSQL Business records and SQL-backed ledgers and events Shared database infrastructure in both topologies
Valkey or Redis Cache and configured shared runtime state Included in the supplied Compose and Helm stacks
NATS with JetStream Event messaging and queued work Included in the supplied stacks. Account for retained message storage
PgBouncer PostgreSQL connection pooling Enabled by default in Helm. Runtime connections can use pooling while schema migrations use a direct PostgreSQL connection
Gotenberg PDF conversion Enabled by default in Helm, with an external URL option
Reverse proxy or ingress HTTPS and routing to the frontend, APIs, schemas and MFE assets Compose supplies Traefik. Kubernetes needs a compatible controller installed in the cluster
TigerBeetle Optional ledger backend Provision separately when selecting ledger.type: tigerbeetle
KurrentDB Optional event store backend Select with ledger.eventStoreType: kurrent. Helm can deploy it, and Compose has an extension file

The Helm chart runs lib-ledger-core inside the application processes and configures separate SQL ledger databases. Current Compose files also define standalone book-keeper and stock-keeper containers. Size the actual rendered service set for the chosen package. Avoid deriving a Kubernetes pod count from the Compose service count.

Some modules are dependencies loaded inside another application process, including invoice, ledger and protocol libraries. A Python package does not automatically require its own server.

For the supplied server stacks, plan the following services in either topology.

Resource What the infrastructure team needs to provide
Compute Application APIs, workers, migration jobs, reverse proxy and infrastructure services. Kubernetes also consumes node capacity for its system components
Database PostgreSQL with application credentials, migration access and enough connections for APIs and workers. Supplied manifests use PostgreSQL 15
Cache Reachable Valkey or Redis endpoint and credentials
Messaging Reachable NATS endpoint with JetStream and an explicit retention and persistence configuration
File storage Durable storage for uploaded attachments and generated files according to the configured storage provider. Replicas need access to the same files
Backups Database and file backups, retention, restore access and a recovery procedure
Networking DNS name, HTTPS certificate, private service connectivity and outbound access to required registries and integrations
Operations Application and worker logs, resource metrics, database monitoring, disk alerts and deployment access

A single PostgreSQL server can host multiple databases. The Helm helpers use the business database plus book_keeper and stock_keeper for SQL ledgers unless overridden. Include all data stores used by the selected release in migrations and backups.

Helm supports external database, cache and messaging services through externalConfig. Disable the corresponding bundled component when using an external endpoint. Configure both the application database URL and migration URL, together with the ledger database overrides where needed. External infrastructure still needs its own capacity, backup and availability planning.

The figures below are provisional planning estimates for a low-volume pilot using SQL-backed ledgers and events. They assume one replica per application workload and exclude optional TigerBeetle, KurrentDB, large PDF workloads, bulk imports and long-running reports. They are proposed budgets for initial measurement. There is no measured user or transaction capacity attached to these figures.

Deployment Initial compute budget Initial storage budget
Monolith pilot on one VM, including PostgreSQL, Valkey and NATS 4 vCPU, 8 GiB RAM 100 GiB SSD, with backups stored separately
Full macroservice pilot on one VM, including shared infrastructure 8 vCPU, 16–24 GiB RAM 150–200 GiB SSD, with backups stored separately
Monolith application workloads on an existing Kubernetes cluster with external PostgreSQL, cache and messaging 2–4 vCPU and 4–8 GiB RAM available to application workloads Container and log storage plus separate durable storage for uploads
Full macroservice application workloads on an existing Kubernetes cluster with external PostgreSQL, cache and messaging 4–8 vCPU and 8–16 GiB RAM available to application workloads Container and log storage plus separate durable storage for uploads

Kubernetes application budgets exclude control-plane and node-system overhead, ingress, shared infrastructure, monitoring, rollout overlap and failover capacity. Add those allocations before purchasing cluster nodes. Co-locating all services on one VM gives the VM a shared failure boundary.

For availability across node failure, calculate enough surviving capacity to run the required replicas after a node is lost. Database, file storage and messaging availability need corresponding designs. Confirm the customer’s recovery time and allowable data loss before choosing the number and placement of nodes.

Estimate storage from retained business records, ledger entries and indexes, PostgreSQL WAL, attachments, message retention, application logs and backups. Keep space for migrations and growth. Increase compute based on measured response time, worker queue age, report duration and memory use under the customer’s expected peak load.

Setting or template Current behavior Planning consequence
Application resources Empty by default Set requests and limits for the actual API and worker workloads
Application replica fallback One Review availability and rollout capacity per service
Bundled PostgreSQL One replica, requests 1 CPU and 2 GiB RAM, limits 2 CPU and 4 GiB RAM Include that allocation in cluster capacity. The template provides a single database instance
PostgreSQL volume postgres.persistence.size: 8Gi Set a volume size based on expected data and growth
PgBouncer Two replicas, each requesting 100m CPU and 128 MiB RAM Include both pools in the connection budget
KurrentDB Enabled by default, with a 50 GiB volume Disable it when the deployment uses only SQL event storage
KurrentDB replica setting Values declare three, but the current StatefulSet template fixes replicas at one Review the rendered StatefulSet before claiming clustered availability
Gotenberg Enabled by default, resources empty Budget for PDF conversion or configure the intended external converter
Ingress and HTTPRoute Disabled by default Configure the selected routing mechanism and its controller
Global HPA Disabled by default. Its current target name differs from the named application Deployments Review or correct the target before using this setting for autoscaling

The chart currently creates Estate and Helpdesk resources as part of its macroservice service set. Confirm the rendered module scope for each release. The chart’s service-specific replicaCount expressions use Helm’s default function, so zero is not a reliable way to disable those workloads.

Kubernetes schedules pods using resource requests and enforces limits separately. Include requested capacity, expected peaks and rollout overlap when estimating nodes. Kubernetes resource management

Traffic Typical port Exposure
Browser to reverse proxy HTTPS 443 Users access the application through this endpoint
HTTP redirect or ACME challenge HTTP 80 As required by the chosen TLS setup
Application APIs 8000 in release containers Private service network behind the proxy
PostgreSQL 5432 Private application, migration and administration access
PgBouncer 6432 Private runtime database access where enabled
Valkey or Redis 6379 Private application access
NATS clients 4222 Private application and worker access
KurrentDB 2113 Private access when selected
Gotenberg 3000 Private PDF conversion access

These are defaults for planning firewall rules. Match them to the deployed configuration. Additional cluster, replication or monitoring ports depend on the infrastructure operator’s topology. Local development uses extra host ports for Vite and domain APIs.

Information needed for a customer estimate

Section titled “Information needed for a customer estimate”

Collect the enabled modules and locations, total and peak concurrent users, daily and peak transaction volumes, POS device count, bulk import sizes, reporting and PDF workload, attachment volume and retention, availability target, recovery time and allowable data loss. Also confirm whether the customer supplies managed PostgreSQL, cache, messaging, storage, TLS and monitoring.

Use that information to select a topology and initial budget, then measure a representative workload before finalizing a production capacity commitment. Record the tested application version, configuration, data volume and throughput alongside the final estimate.

The source files used for this inventory are the root macroservices.Procfile and monolith.Procfile, deploy/compose/docker-compose.base.yml, the monolith and macroservices Compose files, deploy/helm/business-m/values.yaml, its infrastructure and worker templates, and deploy/deb/lib/systemd/system/business-m.service.

Use the deployment guide for setup commands and the repository’s deploy/uat-release.md for the UAT release procedure.