For example, how can I tie the dashboard python web server to an http service in there? How can I make sure that the other web server’s are exposed too?
Or is fly.io only suited for static sites without web server?
Hi… I don’t know the Python ecosystem that well, but it looks like you’re listening on port 5000, whereas internal_port is set to 8080.
[http_service] implicitly serves ports 80 and 443 to the outside world, so you should be ok there.
Also, it would probably be wise to move the long sh -c argument into a separate file, since it looks like you might have some glitches with quotation marks. (Or perhaps that’s the forum software mangling afterward, .)
Is it possible to run two different webservers on one machine (One for port 8080 and the other one for port 8000)? Port 8000 doesn’t stream html, but is just a rest API.
The above doesn’t emphasize it, but you would need to also add a [[services]] block to fly.toml, one with internal_port = 8000 and external ports disjoint from 80 and 443.
(E.g., choosing 8443 as the external HTTPS port for that second service.)
(Try to match the auto-start/auto-stop settings in both blocks, incidentally; it’s not clear what happens when they differ, .)
Aside: If the dashboard is purely for personal use, then you might want to consider changing it to .internal-only. That gives (much) better security, and you can use flyctl proxy to tunnel through when you need access.
(You would need to listen on IPv6 for that, though.)