update db-seed
This commit is contained in:
13
db-seed/import.sh
Normal file
13
db-seed/import.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
: "${POSTGRES_USER:=postgres}"
|
||||
: "${POSTGRES_DB:=toir}"
|
||||
: "${PGPASSWORD:=change-me}"
|
||||
|
||||
until pg_isready -h postgres -U "$POSTGRES_USER" -d "$POSTGRES_DB" >/dev/null 2>&1; do
|
||||
echo "waiting for postgres..."
|
||||
sleep 2
|
||||
done
|
||||
|
||||
psql -h postgres -U "$POSTGRES_USER" -d "$POSTGRES_DB" -v ON_ERROR_STOP=1 -f /seed/equipment-import.sql
|
||||
Reference in New Issue
Block a user