From f07e363345a7ac2a6172a73c01d78e461152c53e Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Mon, 30 Oct 2023 14:41:15 +0100 Subject: [PATCH] fix(shell): change prefix for health checks Since Pongo sets the prefix to use to `/kong-plugin/servroot/` the healthchecks would always fail because they would check in the default location. This fixes them. Health is ok, if Kong is running in the container. So in case of a `pongo shell` it is unhealthy until Kong is started. --- README.md | 7 +++++++ assets/docker-compose.yml | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/README.md b/README.md index c5b41d48..4006a399 100644 --- a/README.md +++ b/README.md @@ -844,6 +844,13 @@ The result should be a new PR on the Pongo repo. --- +## unreleased + +* Fix: health-checks on Pongo container. Use proper prefix. + [#456](https://github.com/Kong/kong-pongo/pull/456). + +--- + ## 2.8.0 released 24-Oct-2023 * Fix: `pongo down` would not remove volumes. This diff --git a/assets/docker-compose.yml b/assets/docker-compose.yml index c4f796dd..c1cb2320 100644 --- a/assets/docker-compose.yml +++ b/assets/docker-compose.yml @@ -152,6 +152,16 @@ services: - PONGO_COMMAND=${ACTION} - PONGO_NETWORK=${SERVICE_NETWORK_NAME} - PONGO_ID=${PROJECT_ID} + healthcheck: + interval: 5s + retries: 10 + test: + - CMD + - kong + - health + - --prefix=/kong-plugin/servroot/ + timeout: 10s + disable: ${SERVICE_DISABLE_HEALTHCHECK:-false} networks: pongo-test-network: aliases: