Skip to content

Add path http health check ability on before proxy start#95

Open
le0pard wants to merge 2 commits intobasecamp:mainfrom
le0pard:health-check
Open

Add path http health check ability on before proxy start#95
le0pard wants to merge 2 commits intobasecamp:mainfrom
le0pard:health-check

Conversation

@le0pard
Copy link
Contributor

@le0pard le0pard commented Oct 20, 2025

Motivation

Sometimes systems like Heroku start accept traffic if port ready in container. But in reality it is not correct, because rails may need more time to start. This PR introduce new config variable HTTP_HEALTH_PATH, which allow to set rails path, which should return 200 http status code. Only after returning 200 status code thruster start proxy on ports. In this case it allow to delay starting port before rails ready

Should fix #91

TargetPort: getEnvInt("TARGET_PORT", defaultTargetPort),
UpstreamCommand: os.Args[1],
UpstreamArgs: os.Args[2:],
UpstreamArgs: append([]string{}, os.Args[2:]...),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prevent UpstreamArgs mutation

@le0pard
Copy link
Contributor Author

le0pard commented Jan 27, 2026

Ping @monorkin @kevinmcconnell

@le0pard le0pard force-pushed the health-check branch 2 times, most recently from 3877352 to 3975263 Compare February 7, 2026 09:08
@le0pard le0pard force-pushed the health-check branch 2 times, most recently from 5d7033f to cc9d928 Compare February 12, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Thruster on Heroku - Delay binding to HTTP_PORT until TARGET_PORT is available?

1 participant