You are browsing as a guest. Sign up (or log in) to start making projects!

28m 27s logged

It’s running on the Pi!

I used a docker container to allow the web app to be easily hosted on a Raspberry Pi 4. Docker provided a somewhat seamless transition from my local linux environment to the Pi, but I still had to cross compile it for the ARM64 architecture and had to modify a few things

Andddd of course I got stuck somewhere in the middle

So web apps in docker apparently dont use localhost, instead, they use 0.0.0.0 and expose their port at runtime. This made it quite complicated, because the JavaScript needed to call its websocket from…itself (but on the browser end aka localhost), whereas the Python server would serve 0.0.0.0, which would be then connected to localhost by the daemon. This took me some time to realize, and it was more annoying to recompile the image every time I wanted to make a subtle change.

0
12

Comments 0

No comments yet. Be the first!