Fig.
This commit is contained in:
parent
50c09481ec
commit
16e742fcd7
5 changed files with 59 additions and 4 deletions
3
docker/postgres/Dockerfile
Normal file
3
docker/postgres/Dockerfile
Normal file
|
@ -0,0 +1,3 @@
|
|||
FROM postgres:9.3
|
||||
ADD dbsetup.sh /docker-entrypoint-initdb.d/
|
||||
|
10
docker/postgres/dbsetup.sh
Normal file
10
docker/postgres/dbsetup.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/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
|
||||
|
Reference in a new issue