What’s the best architecture to manage multi-tenant frappe ERPNext setup with white-label support?

What’s the best architecture to manage multi-tenant frappeERPNext setup with white-label support?

I want each tenant to have:

Separate DB (one per tenant)

Shared base code and core modules

Custom modules per client

White-label branding managed from UI (not code)

Easy CI/CD for updates and Docker deployments

Any recommended Git structure or deployment best practices for scalability and maintenance?