Deploy fly apps using custom made bot

This is going to sound silly, but the best way to automate Fly deploys is probably to just run flyctl from your bot code.

Heroku pipeline promotions basically work by deploying the result of a previous build. The basic process of this on Fly is:

  1. Build your Docker image, probably with a CI tool
  2. Tag image with registry.fly.io/<app>:<tag>
  3. Push to registry.fly.io
  4. flyctl deploy -i registry.fly.io/<app>:<tag>

You can use our GraphQL API to replicate this logic but it’s more work. And flyctl is designed to be easy to run, you can just bundle it with your bot and shell out to it directly.

2 Likes