fix(supabase): db:trial database logs no statement from its first start

The image's init (migrate.sh) sent the supabase_admin password as SQL text
while its postgresql.conf logged DDL, so the password reached the container
log. The server now starts with -c log_statement=none, which the entrypoint
also hands to the init server; a harness check pins it, and DEPLOY.md makes
the post-init log scan a production prerequisite.
This commit is contained in:
bchanot committed 2026-11-11 19:53:56 +01:00
1 parent c6c984b954
commit 5f63d2229c
4 files changed
+15 -2

No files matched your search

+1
View File
@@ -723,6 +723,7 @@ check "create: gateway refuses GoTrue's admin API" log_has 'location /auth/v1/ad
check "create: gateway names itself on /__faunosteo_stack" log_has 'location = /__faunosteo_stack { default_type text/plain; return 200 "faunosteo_trial\n"; }'
check "create: the database init turns statement logging on errors off first" log_has 'set log_min_error_statement = panic;'
check "create: the database init silences statement logging and verbose errors, in order, before the first ALTER" lines_before_first "$(run_line faunosteo_trial_db | sed 's/\\n/\n/g')" '^ALTER ' '\set VERBOSITY terse' "set log_statement = 'none';" 'set log_min_duration_statement = -1;' 'set log_min_error_statement = panic;' "set pgaudit.log = 'none';" 'set pg_stat_statements.track_utility = off;'
check "create: statement logging off on the server command line, so the image's init server (its migrate.sh ALTER USER ... PASSWORD) logs no statement" grep -qE 'exec docker-entrypoint\.sh postgres( [^ ]+)* -c log_statement=none( |$)' <(run_line faunosteo_trial_db | sed 's/\\n/\n/g')
check "create: migrations through the CLI on the trial URL only" log_has 'supabase --workdir . migration up --db-url postgresql://postgres@127.0.0.1:58432/postgres?sslmode=disable PGPASSWORD=set'
check "create: equine_draft.sql loaded" stdin_has "-- Official equine anatomical sheet"
check "create: seed.sql never loaded" stdin_lacks faunosteo.local