Deploying to Fly.io
Fly.io’s main interface is a command-line tool called flyctl
, which we can install with the following:
iwr https://fly.io/install.ps1 -useb | iex
on Windows PowerShellcurl -L https://fly.io/install.sh | sh
on Linux and macOS- You can also use
brew install flyctl
on macOS too
Signing up with Fly.io is easy: issue the flyctl auth signup
command. We recommend connecting your GitHub account, as you will need it later.
We can now deploy to Fly.io by executing flyctl launch
in our current working directory (make sure there are no fly.toml
files) and answering the following questions:
$ flyctl launch Creating app in /path/to/Chapter 10 Scanning source code Detected a Dockerfile app ? App Name (leave blank to use an auto-generated name): ? Select organization: Matteo Collina (personal) ? Select region: fra (Frankfurt, Germany) Created app shy-fog-346 in organization personal Wrote config file fly.toml ? Would you like to setup a Postgresql...