Hi there,
I am having a problem that is driving me crazy. Just now
I do have a working setup of two docker container running in the same network (nr_default) started via docker-compose:
- nodered - port 1880:1880
- getcam - port 8844:80
(getcam grabs one snapshot.jpg per second from a webcam's rtsp stream and provides this file via lighttpd)
What I can do:
-
I can access the snapshot via http://ip_docker_host:8844/snapshot.jpg, both, from nodered flows and from external web browser
-
I can also jump into the running nodered container and download the snapshot with curl -O http://getcam:80/snapshot.jpg; name resolution of getcam is provided by Docker itself
What I can't do:
I would like to close most ports of my docker stack and therefore replaced http://docker_host_ip:external_port with http://container_name:internal_port in below attached flow. But this doesn't show anything. Although the nodered container in principle is able to resolve getcam:80 as mentioned above. Weird.
Any hint to the right direction would be highly appreciated. Thanks.
[{"id":"2b768930.6f677e","type":"inject","z":"fa03549d.e12a88","name":"","topic":"","payload":"<html><img ng-src=\"http://192.168.2.100:8845/snapshot.jpg\"></html>","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":180,"y":340,"wires":[["94969a6e.b0dd1"]]},{"id":"94969a6e.b0dd1","type":"function","z":"fa03549d.e12a88","name":"","func":"return {\n template: msg.payload\n};","outputs":1,"noerr":0,"x":310,"y":340,"wires":[["d7d97ed9.b8d0a8"]]},{"id":"d7d97ed9.b8d0a8","type":"ui_template","z":"fa03549d.e12a88","group":"6c1d575b.2dfa78","name":"CAM","order":1,"width":"3","height":"2","format":"","storeOutMessages":false,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":430,"y":340,"wires":[["9835124d.4afbf"]]},{"id":"9835124d.4afbf","type":"debug","z":"fa03549d.e12a88","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":590,"y":340,"wires":[]},{"id":"6c1d575b.2dfa78","type":"ui_group","z":"","name":"Test","tab":"3e818533.347cba","disp":true,"width":"6","collapse":false},{"id":"3e818533.347cba","type":"ui_tab","z":"","name":"Test","icon":"dashboard","disabled":false,"hidden":false}]