انتقل إلى المحتوى
#0290
ExecContainers

One exec, forty tenants, a folder per hostname

Your white-label widget serves forty brands. Each needs its own config endpoint, its own theme JSON, a few custom handlers, and no trace of the others.

The exec service namespaces scripts by subdomain. A request to acme. in front of the exec hostname resolves under scripts/acme/1/; globex. resolves under scripts/globex/1/. So acme's /theme is the file scripts/acme/1/theme.ts, and the brand that needs a bespoke /checkout handler gets one in its own folder, with nothing in anyone else's.

No tenant-ID header parsing, no if (brand === 'acme') branches, no router table that grows with the customer list. Onboarding a brand is mkdir. Offboarding is rm -r.

The tenant router is the directory tree.