I've moved from Heroku a while ago, how do I manage my app with `flyctl` (i.e is there something like `fly pull`)

I’ve been running a small, personal instance of Monica on Heroku for a while.
The app was migrated to fly.io with their/your importer and runs nicely.
Now I’d like to change some things in the running app and thus need access to the settings file.

I’ve installed flyctl and see the app with fly list apps, but didn’t find out a way of editing files in my ‘container’.
Is there an equivalent to git pull or git clone in flyctl?

fly is not a platform for hosting git repositories and does not use git as a deploy mechanism like Heroku. If you want a remote shared git repo, I recommended setting up a GitHub or GitLab account for source control to manage your source code, and use flyctl deploy to deploy updates to fly.

fly is not a platform for hosting git repositories and does not use git as a deploy mechanism like Heroku.

I might have been unclear and wanted to make an analogy.

Lemme try again: Is there a way that I can copy all the relevant files to my machine, do some changes and upload them to fly.io again?
Or can I SSH into my fly app somehow?

Only files stored in persistent volumes stick around across deploys. Assuming your config files are on a volume, you can use fly sftp to download, modify, and upload.

Ah, that makes sense. @michael has the right direction. You can use flyctl ssh sftp and flyctl ssh console for an ssh console login.

  • flyctl list apps gives me “app-a”.
  • flyctl ssh sftp, flyctl ssh sftp app-a, flyctl ssh sftp find all give me nothing or Error get app: Could not find App

Are you running flyctl in a folder with a valid fly.toml for your app? Have you tried specifying the app name with -a. E.g., try flyctl ssh console -a name-of-your-app

I don’t have a valid fly.toml file, as the app was migrated from Heroku without detour over my machine.

With flyctl ssh console -a name-of-your-app I can connect, thanks a lot!

Hey @habi I’m running into the same issue. I can connect via ssh as well but I don’t see the toml file in the app folder. How did you find it?

Hi @jesalg

If you’re just looking for your app’s fly.toml config file, you can run the following command from your project’s source directory to get a local copy:

fly config save -a <your-app-name>

Thaks @andie! That worked perfectly. Although now I’m running into a different error:

Error: failed to fetch an image or build from source: app does not have a Dockerfile or buildpacks configured. See Fly Launch configuration (fly.toml) · Fly Docs

That’s a bit unexpected since this app is already up and running. All I’m trying to do is release a new version. So that makes me think the toml file is somehow incomplete or not the same as the one that was generated using the Heroku importer.

I’m not really familiar with what happens with apps imported from Heroku, so hopefully someone else can jump in.

But I suggest checking the build section in the fly.toml. It could be you need to specify the path to builder, image, or dockerfile. See App Configuration (fly.toml) · Fly Docs.

Is this the first time you are re-deploying?