Raspberry Pi Cam Module 3

Think i’am almost their!

I’ve been modifying the code so that the web server and the camera run of two separate services which seams to run ok. The camera is up and running without any error messages but when i go to the web server for the camera (9090 not 8080) it says “This site can’t be reached & took too long to respond.”

This is the github page with the latest code:

Many thanks for your support!


I think your problem is that you specified the port - "9090" for your camera.
The ports format is [<host>:]<container>; because you did not specify a host port, one will be assigned at random.
The easiest fix is to specify the host port yourself, like you did for the webserver.

In the docker compose do I change the port 9090 To 90:90 ?

You can change it to whatever you want really.

If you want to connect to port 9090, change the entry to 9090:9090.
If you want to connect to port 12345, change the entry to 12345:9090.

Note that these are host ports that change; the container port should remain the same.
They are used when you want to connect to the device.

From one container, you can connect to the other container using its service name, without having to expose the port in such a way.
So, within your webserver, you can connect to the camera using http://camera:9090 (or whatever protocol it is actually running).

1 Like

I’ve changed the docker compose camera port to "90:90" and the docker.template & bash file to expose port 90. However when i go to the http://ip:9090/stream it would attempt to load however show the same message took too long to respond.

I’ve updated the github files to the latest code I’ve been attempting to upload. I have also tried changing the balena compose to "9090:9090" however this would show the message saying ... refused to connect. I also attempted to change the expose to 9090 but didn’t make any difference :frowning:

Thank you for the continued support. Hopefully almost their now :crossed_fingers:

Not manged to make any progress in the last couple of weeks with the error :frowning_face:

Would it be possible to make the pi boot to the raspberry pi os instead of Debian bullseye? Then I can use the original working python code!