mirror of
https://github.com/supabase/supabase.git
synced 2026-10-15 14:19:11 +03:00
wip
This commit is contained in:
2 files changed
+31
-8
No files matched your search
@@ -406,6 +406,8 @@ services:
|
||||
- ./volumes/db/pooler.sql:/docker-entrypoint-initdb.d/migrations/99-pooler.sql:Z
|
||||
# Use named volume to persist pgsodium decryption key between restarts
|
||||
- db-config:/etc/postgresql-custom
|
||||
# Start script
|
||||
- ./volumes/db/start.sh:/start.sh:Z
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
@@ -432,14 +434,7 @@ services:
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
JWT_EXP: ${JWT_EXPIRY}
|
||||
command:
|
||||
[
|
||||
"postgres",
|
||||
"-c",
|
||||
"config_file=/etc/postgresql/postgresql.conf",
|
||||
"-c",
|
||||
"log_min_messages=fatal" # prevents Realtime polling queries from appearing in logs
|
||||
]
|
||||
command: ["/bin/sh", "-c", "/start.sh"]
|
||||
|
||||
vector:
|
||||
container_name: supabase-vector
|
||||
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "Starting PostgreSQL..."
|
||||
# Start PostgreSQL as the postgres user
|
||||
gosu postgres postgres -c config_file=/etc/postgresql/postgresql.conf -c log_min_messages=fatal &
|
||||
PGPID=$!
|
||||
|
||||
# Wait for PostgreSQL to be ready
|
||||
echo "Waiting for PostgreSQL to be ready..."
|
||||
until pg_isready; do
|
||||
echo "PostgreSQL not ready yet..."
|
||||
# Check if PostgreSQL is still running
|
||||
if ! kill -0 $PGPID 2>/dev/null; then
|
||||
echo "PostgreSQL process died! Check the logs above for errors."
|
||||
exit 1
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "PostgreSQL is ready!"
|
||||
|
||||
echo "Updating passwords..."
|
||||
# Update passwords using roles.sql
|
||||
psql -v ON_ERROR_STOP=1 -f /docker-entrypoint-initdb.d/init-scripts/99-roles.sql
|
||||
|
||||
# Wait for the PostgreSQL process
|
||||
wait $PGPID
|
||||
Reference in new issue
Block a user