I have a RESTful API in one of my containers (A) and a web service / frontend (B) in another one. Both are using Flask. Communication between both seems to be working because I have a
wait-for-it command in my Docker-compose that looks for the
hostname:port of container A before launching B.
Container A contains the logic to GPIOs, PWM and such, and works well when I access it from my PC directly through the module’s IP and exported port. Something like:
Now I’m trying to create a button in container B that will make this call. For that, I added a simple HTML to make this call with the hostname like
http://<hostname>:5001/gpio/0/22/OUT/0 and it gives me an 404. Checking the logs, the calls are not reaching container B.
The HTML used looks like this:
<a href="http://gpio-python-rest:5001/gpio/0/22/OUT/0" class="btn btn-info" role="button">GPIO 1 off</a>
What am I missing? Should I be adding extra logic in container B for making this? Probably is just a stupid HTML mistake but it’s been ages since I last touched it Thanks! Alvaro.