Deploy To Fly.io
-
Deploy to Fly with the following:
Terminal window fly launch && fly deployIf you do not have an existing Fly project, this command will help you set up one.
-
Next, set all the environment variables from your local
.env
file to Fly infrastructure via the following command:Terminal window fly secrets set VAR_NAME=VAR_VAL -
Finally, deploy to Fly (again) with the following:
Terminal window fly launch && fly deploy -
Now that’s set up, you can deploy in future iterations only by executing the command once.