File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ contrib /ci /tmp
Original file line number Diff line number Diff line change 55
66JOB=$( docker run -d $1 )
77# wait for postgres to boot
8+ CURRENT_DIR=$( cd $( dirname $0 ) ; pwd)
9+ mkdir -p $CURRENT_DIR /tmp
10+ echo " testuser" > $CURRENT_DIR /tmp/user
11+ echo " icanttellyou" > $CURRENT_DIR /tmp/password
12+ JOB=$( docker run -dv $CURRENT_DIR /tmp:/var/run/secrets/deis/database/creds $1 )
813sleep 10
914docker exec $JOB is_master
1015docker rm -f $JOB
Original file line number Diff line number Diff line change 11#! /bin/bash
22#
3- # Copied from https://github.com/docker-library/postgres/blob/ec5ce80ca914e02c2d5eb9fde424039d4cee032e/9.4/docker-entrypoint.sh
3+ # Originally copied and modified from
4+ # https://github.com/docker-library/postgres/blob/ec5ce80ca914e02c2d5eb9fde424039d4cee032e/9.4/docker-entrypoint.sh
45#
56set -e
67
@@ -9,6 +10,9 @@ set_listen_addresses() {
910 sed -ri " s/^#?(listen_addresses\s*=\s*)\S+/\1'$sedEscapedValue '/" " $PGDATA /postgresql.conf"
1011}
1112
13+ POSTGRES_USER=" $( cat /var/run/secrets/deis/database/creds/user) "
14+ POSTGRES_PASSWORD=" $( cat /var/run/secrets/deis/database/creds/password) "
15+
1216if [ " $1 " = ' postgres' ]; then
1317 mkdir -p " $PGDATA "
1418 chmod 700 " $PGDATA "
You can’t perform that action at this time.
0 commit comments