Skip to content

Commit 379a260

Browse files
authored
feat: add rest service healthcheck (#142)
1 parent db2e85b commit 379a260

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

docker/.env.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ DOCKER_SOCKET_LOCATION=/var/run/docker.sock
302302
# Check the LOGFLARE_* access token configuration _above_.
303303
# If Logflare has to be externally exposed - configure securely!
304304

305-
306305
# Google Cloud Project details
307306
# Documentation:
308307
# https://supabase.com/docs/reference/self-hosting-analytics/introduction

docker/docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,21 @@ services:
244244
db:
245245
# Disable this if you are using an external Postgres database
246246
condition: service_healthy
247+
healthcheck:
248+
test: [ "CMD", "postgrest", "--ready" ]
249+
interval: 5s
250+
timeout: 5s
251+
retries: 3
247252
environment:
248253
PGRST_DB_URI: postgres://authenticator:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
249254
PGRST_DB_SCHEMAS: ${PGRST_DB_SCHEMAS}
250255
PGRST_DB_MAX_ROWS: ${PGRST_DB_MAX_ROWS:-1000}
251256
PGRST_DB_EXTRA_SEARCH_PATH: ${PGRST_DB_EXTRA_SEARCH_PATH:-public}
252257
PGRST_DB_ANON_ROLE: anon
253258

259+
PGRST_ADMIN_SERVER_PORT: 3001
260+
PGRST_ADMIN_SERVER_HOST: localhost
261+
254262
# PostgREST accepts a plain-text symmetric secret, a single JWK, or a JWKS.
255263
# For Podman, use either PGRST_JWT_SECRET: ${JWT_SECRET} or
256264
# PGRST_JWT_SECRET: ${JWT_JWKS}

0 commit comments

Comments
 (0)