Initial commit - estructura completa del proyecto
This commit is contained in:
16
backend/wait-for-db.sh
Executable file
16
backend/wait-for-db.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
# wait-for-db.sh
|
||||
|
||||
set -e
|
||||
|
||||
host="$1"
|
||||
shift
|
||||
cmd="$@"
|
||||
|
||||
until PGPASSWORD=$POSTGRES_PASSWORD psql -h "$host" -U "Scorpion" -d "pycore_db" -c '\q'; do
|
||||
>&2 echo "PostgreSQL no está disponible - esperando..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
>&2 echo "PostgreSQL está listo - ejecutando comando"
|
||||
exec $cmd
|
||||
Reference in New Issue
Block a user