This repository has been archived on 2025-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
bactdb/docker/postgres/dbsetup.sh
Matthew Dillon 16e742fcd7 Fig.
2015-01-05 16:28:03 -09:00

10 lines
250 B
Bash

#!/bin/bash
gosu postgres postgres --single <<- EOSQL
CREATE USER "$PGUSER" WITH SUPERUSER PASSWORD '$PGPASSWORD';
CREATE DATABASE $PGUSER;
CREATE DATABASE $PGDB;
EOSQL
{ echo; echo "host all \"$PGUSER\" 0.0.0.0/0 md5"; } >> "$PGDATA"/pg_hba.conf