fix: use /api/v1/health for server health checks (not /actuator/health)
The server's /actuator/health requires auth. The public health endpoint is /api/v1/health (same as compose-managed server's Docker HEALTHCHECK). Also increased health check retries/timeout and added startPeriod. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -76,7 +76,7 @@ public class ServerApiClient {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public ServerHealthResponse getHealth(String serverEndpoint) {
|
public ServerHealthResponse getHealth(String serverEndpoint) {
|
||||||
try {
|
try {
|
||||||
String url = serverEndpoint + "/actuator/health";
|
String url = serverEndpoint + "/api/v1/health";
|
||||||
var resp = RestClient.create().get().uri(url)
|
var resp = RestClient.create().get().uri(url)
|
||||||
.header("Authorization", "Bearer " + getAccessToken())
|
.header("Authorization", "Bearer " + getAccessToken())
|
||||||
.header("X-Cameleer-Protocol-Version", "1")
|
.header("X-Cameleer-Protocol-Version", "1")
|
||||||
|
|||||||
@@ -167,10 +167,11 @@ public class DockerTenantProvisioner implements TenantProvisioner {
|
|||||||
.withEnv(env)
|
.withEnv(env)
|
||||||
.withHostConfig(hostConfig)
|
.withHostConfig(hostConfig)
|
||||||
.withHealthcheck(new HealthCheck()
|
.withHealthcheck(new HealthCheck()
|
||||||
.withTest(List.of("CMD-SHELL", "wget -q -O- http://localhost:8081/actuator/health || exit 1"))
|
.withTest(List.of("CMD-SHELL", "curl -sf http://localhost:8081/api/v1/health || exit 1"))
|
||||||
.withInterval(5_000_000_000L)
|
.withInterval(5_000_000_000L)
|
||||||
.withTimeout(3_000_000_000L)
|
.withTimeout(5_000_000_000L)
|
||||||
.withRetries(12))
|
.withRetries(30)
|
||||||
|
.withStartPeriod(15_000_000_000L))
|
||||||
.exec();
|
.exec();
|
||||||
|
|
||||||
// Connect to traefik network with DNS alias
|
// Connect to traefik network with DNS alias
|
||||||
|
|||||||
Reference in New Issue
Block a user