We’re always improving the tools at Fly. There are the big features like Fly buildpack support of course and then there are the smaller features which just make life that little bit simpler, like the new
-p option for Fly app creation.
-p flag is used with
flyctl apps create when you create a Fly app for the first time. Setting
-p with a numeric value automatically sets the internal port of the generated fly.toml configuration file.
The internal port is the port your application uses to communicate with the world. We defaulted it to 8080.
With more and more people making use of prebuilt Docker images on Fly though, they don’t have control of which port their image uses. So they have to change the internal port setting.
We noticed that their workflow had become “create app, edit fly.toml file to change the internal port”. That’s one step too many for us.
And so that’s why we added the
-p flag which sets the internal port for you, no edits required. It’s available from release 0.94 of Flyctl.
You can see it in action in this, the first of our Fly Friday videos: