We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bb6553 commit caeaa78Copy full SHA for caeaa78
scripts/init_db.sh
@@ -22,3 +22,15 @@ docker run \
22
-d postgres \
23
postgres -N 1000
24
# ^ Increased maximum number of connections for testing purposes
25
+
26
+export PGPASSWORD="${DB_PASSWORD}"
27
+until psql -h "${DB_HOST}" -U "${DB_USER}" -p "${DB_PORT}" -d "postgres" -c '\q'; do
28
+ >&2 echo "Postgres is still unavailable - sleeping"
29
+ sleep 1
30
+done
31
32
+>&2 echo "Postgres is up and running on port ${DB_PORT}!"
33
34
+DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}
35
+export DATABASE_URL
36
+sqlx database create
0 commit comments