From 8db8192e113ce6b88ccb36db6ae198a0c0399f40 Mon Sep 17 00:00:00 2001 From: Carlos Vera Date: Tue, 21 Jul 2026 17:12:02 +0200 Subject: [PATCH] fix(supabase): add healthchecks to rest and functions services MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `rest` (PostgREST) and `functions` (edge-runtime) ship without a healthcheck at either the image or the compose level, so Docker reports them as plain `Up` with no health state and the compose service never reads as fully healthy in EasyPanel. - rest: the image is distroless, so the check uses PostgREST's own `postgrest --ready` binary against the admin server, enabled on localhost with the port left unpublished. - functions: dependency-free TCP check on :9000 using the bash that already ships in the image. The rest healthcheck is the one merged upstream in supabase/supabase#46658. Reported in #77. No image versions changed. Autor: Carlos Vera --- De un venezolano para el mundo con el favor de nuestro SeƱor JesusCristo. --- supabase/code/docker-compose.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/supabase/code/docker-compose.yml b/supabase/code/docker-compose.yml index a5ffd2f5e..dd42a6bdf 100644 --- a/supabase/code/docker-compose.yml +++ b/supabase/code/docker-compose.yml @@ -258,6 +258,11 @@ services: db: # Disable this if you are using an external Postgres database condition: service_healthy + healthcheck: + test: [ "CMD", "postgrest", "--ready" ] + interval: 5s + timeout: 5s + retries: 3 environment: PGRST_DB_URI: postgres://authenticator:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB} PGRST_DB_SCHEMAS: ${PGRST_DB_SCHEMAS} @@ -265,6 +270,9 @@ services: PGRST_DB_EXTRA_SEARCH_PATH: ${PGRST_DB_EXTRA_SEARCH_PATH:-public} PGRST_DB_ANON_ROLE: anon + PGRST_ADMIN_SERVER_PORT: 3001 + PGRST_ADMIN_SERVER_HOST: localhost + # PostgREST accepts a plain-text symmetric secret, a single JWK, or a JWKS. # For Podman, use either PGRST_JWT_SECRET: ${JWT_SECRET} or # PGRST_JWT_SECRET: ${JWT_JWKS} @@ -426,6 +434,12 @@ services: depends_on: kong: condition: service_healthy + healthcheck: + test: [ "CMD", "bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/9000" ] + interval: 10s + timeout: 5s + retries: 3 + start_period: 20s environment: # Legacy symmetric HS256 key JWT_SECRET: ${JWT_SECRET}