GoogleCloudPlatform / GoogleCloudPlatform/cloud-sql-proxy

Define a Docker health check

Abierto
#2,046 6 comentarios 9 reacciones 1 asignado Asignado a @hessjcg Ver en GitHub
priority: p2 type: feature request
Lenguaje dominante
Go
Estrellas
1.4k
Forks
352
Merge medio
14 h 54 min
PR fusionados (30 d)
5

Descripción

### Feature Description

I'd like to use Docker Compose's [health checks](https://docs.docker.com/compose/compose-file/05-services/#healthcheck) to bring up the proxy before starting dependent services, but I can't seem to be able to ping the readiness endpoints from within the container image.

It would be awesome if there was a health check defined in the cloud-sql-proxy image itself (see https://docs.docker.com/engine/reference/builder/#healthcheck).

### Sample code

_No response_

### Alternatives Considered

I tried pinging the existing readiness endpoint:
```
services:
...
cloud_sql_proxy:
...
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9999/readiness']
interval: 3s
timeout: 3s
retries: 5
```

However, it seems that `curl` is not available in the Docker image, and neither is any other utility that would allow one to hit the readiness endpoint.

### Additional Details

_No response_

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.