Advertisement
Guest User

Untitled

a guest
Nov 8th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.51 KB | None | 0 0
  1.   shellHook = ''
  2.     export PGDATA=$PWD/postgres_data
  3.     export PGHOST=$PWD/postgres
  4.     export LOG_PATH=$PWD/postgres/LOG
  5.     export PGDATABASE=postgres
  6.     export DATABASE_URL="postgresql:///postgres?host=$PGHOST"
  7.     if [ ! -d $PGHOST ]; then
  8.       mkdir -p $PGHOST
  9.     fi
  10.     if [ ! -d $PGDATA ]; then
  11.       echo 'Initializing postgresql database...'
  12.       initdb $PGDATA --auth=trust >/dev/null
  13.     fi
  14.     pg_ctl start -l $LOG_PATH -o "-c listen_addresses= -c unix_socket_directories=$PGHOST"
  15.   '';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement