Мы играем с докером и с пружинной загрузкой, и довольно плохо знакомы с этим ..
Вот наш пример использования:
* There are three Spring Boot based web applications
- web1 = works on port 8010 = exposes API as http://...:8010/web1/rest/someEndPoint_1
- web2 = works on port 8020 = exposes API as http://...:8020/web2/rest/someEndPoint_2
- web3 = works on port 8030 = exposes API as http://...:8030/web3/rest/someEndPoint_3
* All of these should be packaged in single docker image
* Docker may have apache/haproxy/nginx and it should expose port 8080, which
будет привязан к порту хоста на 8080
* Here is requirement :
- If request will come to Docker as http://DOCKER_HOST_IP:8080/web1/rest/someEndPoint_1
==> host will forward traffic to container
==> Proxy running inside container will see pattern
==> http://...:8010/web1/rest/someEndPoint_1
- If request will come to Docker as http://DOCKER_HOST_IP:8080/web2/rest/someEndPoint_1
==> host will forward traffic to container
==> Proxy running inside container will see pattern
==> http://...:8020/web2/rest/someEndPoint_1
- If request will come to Docker as http://DOCKER_HOST_IP:8080/web3/rest/someEndPoint_1
==> host will forward traffic to container
==> Proxy running inside container will see pattern
==> http://...:8030/web3/rest/someEndPoint_1
Можно ли добиться?(Обычно нас просят проверить, возможна или нет маршрутизация трафика на основе шаблона URL?)
Пожалуйста, не стесняйтесь добавлять комментарии / редактировать вопрос!Спасибо и заранее.С уважением ..