Skip to content

Commit dc05102

Browse files
authored
Make help text more helpful if misconfigured Dockerfile causes immediate healthy exit (#4668)
1 parent 1d97fef commit dc05102

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/command/deploy/machines_deploymachinesapp.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,8 @@ func suggestChangeWaitTimeout(err error, flagName string) error {
529529
if timeoutErr.DesiredState() == fly.MachineStateStarted {
530530
// If we timed out waiting for a machine to start, we want to suggest that there could be a region issue preventing
531531
// the machine from finishing its state transition. (e.g. slow image pulls, volume trouble, etc.)
532-
descript = "Your machine was created, but never started. This could mean that your app is taking a long time to start,\nbut it could be indicative of a region issue."
532+
// We also suggest checking the Dockerfile since an immediate exit can appear as a timeout.
533+
descript = "Your machine was created, but never started or exited immediately. This could mean that your app is taking a long time to start,\nbut it could be indicative of a region issue.\n\nAlternatively, your app may have exited immediately due to a startup failure. Check your Dockerfile\nto ensure it specifies a valid start command (e.g., check that your 'CMD' or 'ENTRYPOINT' is correct).\nYou can also try running 'fly logs' to see what happened when the machine tried to start."
533534
suggest = fmt.Sprintf("You can try deploying to a different region,\nor you can try %s", suggestIncreaseTimeout)
534535
} else {
535536
// If we timed out waiting for a different state, we want to suggest that the timeout could be too short.

0 commit comments

Comments
 (0)