Transfered from Heroku

Just hoping for some tips on how to start using the App I have moved from Heroku.
I was able to easily change things withing it, but since coming over to fly_io I do not know how to edit or get to my details, and with being new on here need some tips please has I do not want to mess things up with them being medical!

I have a feeling I’m going to need to use flyctl but not sure so any tips on how or where or what to do will be a great help to me. I’m on a windows OS too and I have already installed flyctl

But if there is other or more easier ways I’l all ears! :slight_smile:

These are some of the things I wil be needing to change settings within this App!

heroku config var settings


Well … I’d say since you list a selection of environment variables, you would at the very least need to tell Fly about them. There are two main ways to do that:

For non-secret ones that you don’t mind other people potentially seeing (ie in plain text) you can stick them in your fly.toml file. That’s a configuration file that the fly launch command generates that tells Fly e.g what ports your app uses, its name, any healthchecks etc. There is an [env] section in there. Check out:

However some of them you will want to keep secret. Things like API keys. You don’t want them anywhere in plain text. That’s where the fly secrets command comes in, from the CLI. That sets secrets and then they are stored encrypted. Only your app can then see them. For those, check out:

So you would e.g do fly secrets set API_SECET=abcdefgh and that would make that secret available to your app. So you would then be able to access it in your app’s code. For example in Nodejs, you would do process.env.API_SECRET to get at it.

1 Like

@greg I have not got up to all of this what you are explaining! I seem to have had issues setting up docker so Im a little nervouse on thii part as Im currently using MKDOCS and do not want to mess them up! Is it possibel to use both within visual studio Code? And also I have signed in with Fly_io should I some how sign in with Github? Thanks for the links will take a look through things slowly!

If I have imported from Heroku how do I start to look at that Apps files? Th e instruction Docs seem to b etelling me how to setup a new one, or Im not sure if I’m miss understanding the instructions. Like I say Im a total Noobs on this! :slight_smile:

Ah, I wasn’t quite sure where you were at. I just noticed the list of environment variables :slight_smile:

I’m not on Windows but I’ve seen other posts where I recall using the Fly CLI within VSCode caused them some issues :thinking:. Not quite sure why. In theory it should just work.

Step one is to install the CLI: Install flyctl · Fly Docs

Next, you definitely read through the rest of the docs on that site to get a better idea of how it all works.

And you may also want to browse their demo apps, since there is possibly one that is similar to your own. Depending on the language, framework etc:

Once you have the Fly CLI, you have access to the fly or flyctl equivalent.

And then in the folder your app is currently in (nodejs, php etc), generally you run fly launch to create a new Fly app. That may detect what kind of app yours is. Which essentially begins with 1 vm, on which it runs. And that creates the fly.toml I mentioned above. And then when you make changes to your code, you run fly deploy to, yep, deploy them. And then creates a new release. And that becomes what e.g then points to.

Of course your app likely will complain about missing environment variables, and refuse to run/error. That’s when you would need to make sure they were set, using either approach mentioned before. Setting a new env would create a new deploy. And then your app would see them, and be happy.

There’s a lot more beyond that :slight_smile:. Volumes, scaling, private networks, databases …


@greg This might be better keeping this setup seperate from Visual studio code, Yes I had no issues with Docker in earlier versions of VBC but somthing as gone wrong down the line and I cannot find any fix for it! I have installed flyctl in windows Power shell! So I’m trying to work out how I see what as been transfered from Heroku into Fly_io but no clue as of yet. Its a learning curve which with very helpful information from yourself is a great benefit to have! Thank you! I have only been on Fly_io for 2 days and so far loving it but its just a lot of info at once to take in, but I do like how it is running for my medical devices so far! For the first time in over a year it seems to be running very smoothly and correctly!

I just don’t want to be the person to mess this setup up! So Its read before you touch :slight_smile: Is it possible to do things to learn without messing the App what has been setup auto for me from Heroku? I think you have answered this in teh above message!

Er … well unfortunately I have not migrated any app from Heroku myself, only created new ones. So I’m not sure :thinking:. Hopefully someone else will be able to assist with that. I don’t know what it does behind the scenes.

Yes, I’d recommend reading the docs, and if you get stuck, you can always use the search (in the top-right header of this page) to look for heroku-related posts. I’m sure someone has probably been through the same process :slight_smile: