Migrating an Elixir app from Heroku to Fly.io using fly.io/launch/heroku

Hello, I am Elixir newbie. I want to create a standalone application on Fly based on the pattern from Heroku to have a test and production version in the future. So I linked Heroku with Fly and created an app which is currently linked. If I understand the process correctly, I now have two separate applications with a separate database and everything needed, but they communicate with each other. I am correct? If I’m right what steps do I need to take to completely break the connection between the apps and have each run independently of the other. Thank you very much for your help.

What actually happened is that Turboku created an app on Fly.io that will be synced with Heroku via webhooks but we don’t create/migrate databases and other services such as Redis immediately what you would have is an environment variable called DATABASE_URL on both Fly.io and Heroku and both values point to the same place (where you host your DB), ditto for Redis and other addons.

When you deploy to Heroku we will pick the updated app there and deploy to Fly.io again.

The first step would be removing the webhook from your Heroku app so Fly.io stop getting updates from your Heroku app, doing this make these apps two different entities.

Since you’re using elixir we have a fly launch CLI command that does all you need to deploy a new app and create databases, I’d recommend trying. The downside of this is that you’d need to create a new app and delete the old one which should be fine if the other app is not your production one and app names won’t matter if you have custom domains.

In case you want to create the database manually one user created a step-by-step migration guide:

As for services such as Redis, you can deploy other apps just for it so you can take benefit of our internal DNS. Say your redis app is named my-redis you can just put on your main app that the host of your redis is my-redis.internal. Read more

Hopefully this will help!


  1. Remove Heroku app webhook
  2. Create database
  3. Deploy additional services
1 Like

Thank you very much !!!

1 Like