==> Verifying app config
✓ Configuration is valid
→ Verified app config
==> Building image
Remote builder fly-builder-dry-brook-6201 ready
Error: failed to fetch an image or build from source: app does not have a Dockerfile or buildpacks configured. See App Configuration (fly.toml) · Fly Docs
how to correct the error below. 0s
Run flyctl deploy --remote-only
Error: the config for your app is missing an app name, add an app_name field to the fly.toml file or specify with the -a flag`
NOTE: the example doesn’t seem to have a .gitignore file, so you can ignore this step. Edit .gitignore and remove fly.toml if it is present in that file - fly.toml will need to be pushed into the repository to allow deployment to happen.
Run flyctl launch from inside the go-example app directory to create a fly.toml configuration file. Say N to adding databases and N to deploy now
Get a Fly API token by running flyctl tokens create deploy -x 999999h. Copy the output.
Go to your newly created repository on GitHub and select Settings.
Go to Secrets and variables > Actions and create a Repository secret called FLY_API_TOKEN with the value of the token from step 5.
Back in your local go-example working directory, create .github/workflows/fly.yml with these contents (Note that the go-example’s default branch is currently master, yours might be main. Change the fly.yml file accordingly.):
You should, after following the process outlined in my reply above, have a fly.toml file in your repo. fly.toml is the config file for your app. You can run fly launch locally in your repo and then push the resulting fly.toml into your remote repo.
Yes, its in the repo but the issue still remained. However I was able to find the fix to the issue. - Make sure the toml file itself has the app_name variable. Once I did this and pushed the code. it worked.
# fly.toml app configuration file generated for vgmify on 2023-05-18T11:06:18-07:00
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
app_name = "vgmify"
app = "vgmify"
primary_region = "lax"
internal_port = 8080
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
Going back to some of your original errors, it seems like your fly.toml file (app config file) is in the directory where your fly.yml file (github actions file) should be. So, maybe the fly deploy command can’t find the Dockerfile it needs?
Suggest maybe starting over from the top of the instructions in my reply above.
Hello @andie - Sorry for the late reply.
When I ran flyctl launch it asked me for a name for the app and I put vgmify. That is what the app variable is. Then it asked for some other things which I declined to based on the documentation for CI/CD with github actions and fly.io.
Then it worked for me AFTER I changed my port to 8080 for fly.io in my app.py for flask/python. (I was used to having it as a variable because of heroku. lol)
Long story short - it seemed to work only AFTER I put the app_name: <INSERT NAME OF WEBAPP> variable as an environment variable inside the fly.toml file after its been created using the flyctl launch. After that, my git push commands would work and my webapp would update once I made sure my ports were set to 8080 for fly.io.
I’m 99% sure that app_name = "vgmify" doesn’t do anything in your fly.toml file, though. I’m not going to ask you to test it out, since you have things working now. Obviously, we need to do better with that error message! It was probably just the deploy process not finding the fly.toml file.
We’ll be pushing some fixes to the docs and error messages, so thank you for posting about the issues you were seeing!