I’am setting up two different Docker Containers metasfresh installations on the same docker Host. The WEB-UI Access ist on the same Docker Host URL and two different ports 80/81this is working fine.
I also have to Access this Installations with the Java Client because not everything in the WEB-UI ist working as expected. Now I have exported in the app and db containers the port on different port Numbers (example: metasfresh1/app Port:61616 -> 61616 metasfresh1/db Port:5432 -> 5432 metasfresh2/app Port:61616 -> 61618 metasfresh2/db Port:5432 -> 5434). If I connect with the java client then I have to define the Applikation Server and Applikation Port with this information the connection gets the DB Information from the app Server with calling the StatusService and is setting the DB Connection. Inside the metasfresh1 and metasfresh2 are the db ports 5432 (in different docker networks) in this situation StatusService always gets db Port 5432 and it is not possible to set it different in the connection Window.
To get a solution for this situation I had set Two Environments in the docker-composer METASFRESH_DB_HOST_ONCLIENT METASFRESH_DB_PORT_ONCLIENT and have changed the StatusService to read this variables an send to the client.
This is now working for me.
Do you think this is a good solution or are there better solutions.
Thanks for you opinion.