Failed deploy, unhealthy allocs

I’m also failing to get my first deployment out which is a hello world. My fly.toml is the default detected for golang projects.

This is most likely one of two things: either the Go app is exiting (possibly because of a crash) or the health checks aren’t passing because we can’t connect to the service.

If you run fly status --all you should see a list of instances in a failed state. fly vm status <id> should give you more details about what actually went wrong. We have more troubleshooting docs here: Troubleshooting your Deployment · Fly Docs

I reread the docs. The port 8080 bit was easy to gloss over.

As with most Go applications, a simple go build will create a hellofly binary which we can run. It’ll default to using port 8080 and you can view it on localhost:

I would put this at the top or give it a heading. Something like:

Default Port generates a fly.toml with the default port of 8080, so your Go application’s port should match what exists in the fly.toml. From our example:

	port := os.Getenv("PORT")
	if port == "" {
		port = "8080"
1 Like