Background
My environment is Java, Play2, MySql
I wrote 3 stateless Restresh Microservices on Play2 → / S1, / S2, / S3
S1 consumes data from S2 and S3. Therefore, when the user presses / S 1, this service asynchronously calls / S 2, / S3, concatenates the data, and returns the final json output. Side notes. Services will eventually be shipped as docker images.
For testing in the development environment, I run / s 1, / s2, / s3 on ports 9000, 9001 and 9002, respectively. I select port numbers from a configuration file, etc. I am in the services and everything is working fine. But is there a better way to configure test env on my developer block correctly? Example. What if I want to run 20 services, etc.
Thus, they will be called in the same way as mydomain.com/s1, mydomain.com/s2, mydomain.com/s3, etc. I want to accomplish this in my core development environment .... I’ll assume that there are some reverse proxies that I assumed.
Question
So the question is, how can I call / S 2 and / S3 from S1 without specifying or using a port number in the developer environment. How do people test microservices on their local machine?
Extra bonus
Knowing that I will send my services in the form of docker images, how can I do the same with docker containers (each container works with one service)