Whenever I get a new customer I need to deploy a standalone system (a nodejs server, database etc.) for him. I want to streamline the whole deploy process and that is why I am thinking about using Docker, (swarm in particular).
But is it a good practice to deploy one docker container for one customer (only) in Docker Swarm? That container will run the nodejs service while there will be just one DB service in my swarm, but separate db file for each customer.
I have this question because due to my limited understanding of docker, scaling up the replicas seems mainly for load balance when the service nodes can’t handle the traffic. But my usage is one customer one container/service.
Besides, each customer will have its own domain name under my main domain field, e.g. say my company have the domain name ‘xyz dot com’ , then customer A will have the domain name a dot xyz dot com, customer B will have the domain name b dot xyz dot com. How does my nginx service route each customer’s HTTP request to its own container?