I have a web application built with nodejs and deployed on vps and uses nginx server, I need when the users register in my website to create a subdomain for each user registers.
The problem is I am creating a docker container for each user registers and this docker container maybe on another vps server, each docker container has an IP,
My question is: how can this be configured using nginx or other proxy server to relate the created subdomain with the created docker container's ip?
Please note:
The reason that lead me to make different container for each user because the application offers a storage system and other services for users and this storage system is based on a plan the user selects, the plan can be changed later to increase the storage so it will be hard to put all of that on the same server, also I used containers to apply the isolation concept for each user storage and resources consuming