Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Docker compose : How to redirect UI container to RabbitMQ's admin page

$
0
0

I have a docker compose project that is composed of a frontend UI (it's blazor but I don't think it matters for this question), an ASPNetCore web API and several supporting containers like MSSql, RabbitMQ, Seg, Jaeger, etc. Most of these supporting containers have some kind of admin page that is exposed on a certain port.

This is the section in my docker-compose.yml file for the RabbitMQ container :

#Message Queuesome.queue:  image: ${DOCKER_REGISTRY-}rabbitmq:3-management  hostname: some-queue  networks:    - some-network  ports:    - 5672:5672    - 15672:15672  volumes:    - ./queue/data/:/var/lib/rabbitmq    - ./queue/log/:/var/log/rabbitmq  environment:    RABBITMQ_DEFAULT_USER: guest    RABBITMQ_DEFAULT_PASS: guest

When I run the project on my computer, I am able to navigate to http://localhost:15672 and see the RabbitMQ management page. I am also able to make an admin page in my blazor frontend that has a button executing the following code :

NavigationManager.NavigateTo("http://localhost:15672");

This works beautifully on my computer, the Blazor frontend can redirect to any container's admin page as long as it's exposed like I showed above.

The issue arises when I deploy this to AWS on a Lightsail instance. The redirection to localhost works but it redirects to MY localhost, not the lightsail instance. How do I get the frontend to redirect to the management page exposed on the host the docker-compose project lives on? I tried something like this and it fails (some queue being the name of the container):

NavigationManager.NavigateTo("http://some-queue:15672");

Is there a way for Blazor (or any frontend really) to be able to redirect the browser to the admin page of another container that lives in the same docker compose project?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>