16 lines
242 B
Bash
16 lines
242 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
if [ "$DATABASE" = "postgres" ]
|
||
|
then
|
||
|
echo "Waiting for postgres..."
|
||
|
|
||
|
while ! nc -z $SQL_HOST $SQL_PORT; do
|
||
|
sleep 0.1
|
||
|
done
|
||
|
|
||
|
echo "PostgreSQL started in production mode"
|
||
|
EXPORT IS_PRODUCTION=1
|
||
|
fi
|
||
|
|
||
|
exec "$@"
|