Skip to content

Supabase template: rest and functions have no healthcheck (service stays grey in EasyPanel/Swarm) #77

Description

@Carlos-Vera

Summary

In supabase/code/docker-compose.yml (branch main), two services run without any healthcheck:

  • restpostgrest/postgrest:v12.2.12
  • functionssupabase/edge-runtime:v1.67.4

kong and meta also omit a Compose-level healthcheck, but their images ship a HEALTHCHECK, so Docker still reports them as healthy. rest and functions have none at either level.

Why it matters

EasyPanel aggregates per-container health into a single status for the Compose service. A container with no healthcheck is reported by Docker as plain Up (no health state), so EasyPanel keeps the whole service grey and never turns it green, even when everything is fully working. Operationally you cannot tell "no check defined" from "actually down".

Verified on a running deployment (EasyPanel on Docker Swarm):

$ docker ps --format 'table {{.Names}}\t{{.Status}}' | grep supabase
...-rest-1        Up 15 hours
...-functions-1   Up 15 hours
...(other 11)     Up 15 hours (healthy)

Proposed fix

functions (supabase/edge-runtime) — the image ships bash and the runtime listens on :9000 (the port Kong proxies /functions/v1 to). A dependency-free TCP check works:

    healthcheck:
      test: [ "CMD", "bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/9000" ]
      interval: 10s
      timeout: 5s
      retries: 3
      start_period: 20s

rest (postgrest/postgrest) — this image is distroless (no sh/bash/curl/wget), so a standard CMD/CMD-SHELL check cannot run inside it. PostgREST exposes a built-in admin server with /live and /ready when PGRST_ADMIN_SERVER_PORT is set, but there is no in-image tool to query it. Options: mount a tiny static healthcheck helper, document the limitation, or rely on the upstream PostgREST image gaining a HEALTHCHECK.

Happy to send a PR with the functions fix.

Notes

The same gap exists upstream in supabase/supabase (docker/docker-compose.yml); also reporting it there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions