Fly.ioAnnouncement
Fly Friday - Flyctl and Ports
Summary
Flyctl adds a new -p option to flyctl apps create, allowing users to set an app’s internal port during initial creation. The numeric value is written to the generated fly.toml configuration, replacing the default port of 8080. This addresses workflows using prebuilt Docker images, where users may not control the port and previously had to create the app, edit fly.toml, and change the internal port manually. Available from Flyctl release 0.94, the flag removes that edit and is shown in the first Fly Friday video. The post defines the internal port as the port an application uses to communicate with the world, while the command-line setting supplies that value before deployment configuration is generated.
Context
Prebuilt Docker images may use ports that app users cannot control, creating a workflow in which users must create a Fly app and then manually edit fly.toml to change the internal port from its default.
Approach / What changed
Add a numeric -p option to flyctl apps create so the requested internal port is automatically written to the generated fly.toml configuration. The option is available starting with Flyctl release 0.94.
Takeaways
The -p flag is used when creating a Fly app for the first time and accepts a numeric internal-port value.
Generated Fly configurations default to internal port 8080 when no different port is specified.
The flag removes the need to edit fly.toml after app creation when using a prebuilt Docker image with a different port.
Source and freshness
- Source
- fly.io
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.