OCI: Add curl program, to unlock Docker Compose health checks (#419)
Some checks failed
build / build (push) Has been cancelled
build / build_ui (push) Has been cancelled
build / database_test (push) Has been cancelled
build / object_store_memory_test (push) Has been cancelled
build / object_store_direct_test (push) Has been cancelled
build / openssl_build (push) Has been cancelled
build / mac_cross_build (push) Has been cancelled
build / Docker Image Build (push) Has been cancelled

## About
The existing healtcheck endpoint http://localhost:8080/health can now be
used without much ado within Docker Compose service definitions, and it
works well.

```yaml
healthcheck:
  test: ["CMD", "curl", "--fail", "http://localhost:8080/health"]
  start_period: 3s
  interval: 1.5s
  retries: 30
  timeout: 30s
```

## References
- Resolves: https://github.com/roapi/roapi/issues/418
- See also:
https://github.com/crate/cratedb-examples/pull/1320#pullrequestreview-3601457082
This commit is contained in:
Andreas Motl 2025-12-23 03:42:34 +01:00 committed by GitHub
parent 4d649d78b9
commit 0a247a96a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,7 +47,7 @@ FROM debian:bookworm-slim
LABEL org.opencontainers.image.source=https://github.com/roapi/roapi
RUN apt-get update \
&& apt-get install -y libssl-dev ca-certificates \
&& apt-get install -y libssl-dev ca-certificates curl \
&& rm -rf /var/lib/apt/lists/*
COPY test_data /test_data
COPY --from=builder /roapi_src/target/release/roapi /usr/local/bin/roapi