numerus-docker/postgres/deploy.sh

10 lines
313 B
Bash
Raw Normal View History

#!/bin/bash
set -e
cd /usr/share/numerus/sqitch
PGUSER="$POSTGRES_USER" PGDATABASE="$POSTGRES_DB" sqitch deploy
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE ROLE "${NUMERUS_USER:-numerus}" LOGIN PASSWORD '${NUMERUS_PASSWORD:-numerus}' IN ROLE authenticator
EOSQL