How to customize subdomains in custom apps

I have used frappe_docker to create a custom app with one site that has ERPNext, Helpdesk, and HRMS installed.

I want to implement subdomain-based routing within this single site. Specifically:

• The main website should be accessible at example.com.

• ERPNext should be accessible at erpnext.example.com.

• Helpdesk should be accessible at helpdesk.example.com.

• HRMS should be accessible at hrms.example.com.

I want to achieve this without creating multiple sites (i.e., one app per site). Instead, I want all apps to remain installed in the same site and be served via specific subdomains.

Is it possible to configure this within Frappe? If so, I’d greatly appreciate guidance or pointers to the right direction.

Thanks in advance!