ipld-eth-db/scripts/startup_script.sh

15 lines
359 B
Bash
Raw Normal View History

#!/bin/sh
set -e
# Default command is "goose up"
if [[ $# -eq 0 ]]; then
set -- "up"
fi
# Construct the connection string for postgres
VDB_PG_CONNECT=postgresql://$DATABASE_USER:$DATABASE_PASSWORD@$DATABASE_HOSTNAME:$DATABASE_PORT/$DATABASE_NAME?sslmode=disable
# Run the DB migrations
2024-07-08 09:48:16 +00:00
set -x
exec ./goose -dir migrations postgres "$VDB_PG_CONNECT" "$@"