#!/bin/bash
set -e

psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" --port "${PGPORT:-5432}" <<-EOSQL
    CREATE DATABASE simpleidp;
    GRANT ALL PRIVILEGES ON DATABASE simpleidp TO "user";
EOSQL
