We just released external port ranges ![]()
You can expose multiple ports from your app that point to the same internal port. External port definitions now allow specifying start_port and end_port, which are internally translated to a list of ports.
For example, start_port: 8080, end_port: 8085 points external ports 8080, 8081, 8082, 8083, 8084 and 8085 to your internal_port.
How?
In fly.toml:
[[services.ports]]
handlers = ["http"]
start_port = 8080
end_port = 8085
When creating a machine with fly machines run:
fly machines run -p 8080-8085:1234/tcp:http [...]