Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix(self-hosted): add healthcheck to rest (PostgREST) service (#46658)

Carlos Vera712387bbac26
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index fa5fda1f376..47c89e8aa7d 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -257,6 +257,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}
@@ -264,6 +269,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}