Sha256: f449b5c152f5127aa4c551284b9c17d0cb6465b143bea455282daa057ab21562

Contents?: true

Size: 1.33 KB

Versions: 90

Compression:

Stored size: 1.33 KB

Contents

# docker run -p "5433:5432" --cpus 0.2 postgres:9.5-alpine

SCHEMA="pact_broker"
set +e
export PACT_BROKER_DATABASE_HOST="127.0.0.1"
export PACT_BROKER_DATABASE_PORT="5433"
psql postgres -h $PACT_BROKER_DATABASE_HOST -p $PACT_BROKER_DATABASE_PORT -U postgres -c "DROP DATABASE ${SCHEMA};"
psql postgres -h $PACT_BROKER_DATABASE_HOST -p $PACT_BROKER_DATABASE_PORT -U postgres -c "CREATE DATABASE ${SCHEMA};"
psql postgres -h $PACT_BROKER_DATABASE_HOST -p $PACT_BROKER_DATABASE_PORT -U postgres -c "CREATE USER pact_broker WITH PASSWORD 'pact_broker'"
psql postgres -h $PACT_BROKER_DATABASE_HOST -p $PACT_BROKER_DATABASE_PORT -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE ${SCHEMA} to pact_broker;"
psql postgres -h $PACT_BROKER_DATABASE_HOST -p $PACT_BROKER_DATABASE_PORT -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE ${SCHEMA} TO pact_broker;"
echo ""
echo "run the following command to set your environment variables:"
echo "export PACT_BROKER_DATABASE_USERNAME=pact_broker"
echo "export PACT_BROKER_DATABASE_PASSWORD=pact_broker"
echo "export PACT_BROKER_DATABASE_NAME=${SCHEMA}"
echo "export PACT_BROKER_DATABASE_HOST=${ip}"
echo "export PACT_BROKER_DATABASE_PORT=${PACT_BROKER_DATABASE_PORT}"
echo "To test:"
echo "psql -h \$PACT_BROKER_DATABASE_HOST -p \$PACT_BROKER_DATABASE_PORT -d \$PACT_BROKER_DATABASE_NAME -U \$PACT_BROKER_DATABASE_USERNAME"

Version data entries

90 entries across 90 versions & 1 rubygems

Version Path
pact_broker-2.89.1 script/recreate-docker-pg-db.sh
pact_broker-2.89.0 script/recreate-docker-pg-db.sh
pact_broker-2.88.0 script/recreate-docker-pg-db.sh
pact_broker-2.87.0 script/recreate-docker-pg-db.sh
pact_broker-2.86.0 script/recreate-docker-pg-db.sh
pact_broker-2.85.1 script/recreate-docker-pg-db.sh
pact_broker-2.85.0 script/recreate-docker-pg-db.sh
pact_broker-2.84.0 script/recreate-docker-pg-db.sh
pact_broker-2.83.0 script/recreate-docker-pg-db.sh
pact_broker-2.82.0 script/recreate-docker-pg-db.sh
pact_broker-2.81.0 script/recreate-docker-pg-db.sh
pact_broker-2.80.0 script/recreate-docker-pg-db.sh
pact_broker-2.79.1 script/recreate-docker-pg-db.sh
pact_broker-2.79.0 script/recreate-docker-pg-db.sh
pact_broker-2.78.1 script/recreate-docker-pg-db.sh
pact_broker-2.78.0 script/recreate-docker-pg-db.sh
pact_broker-2.77.0 script/recreate-docker-pg-db.sh
pact_broker-2.76.2 script/recreate-docker-pg-db.sh
pact_broker-2.76.1 script/recreate-docker-pg-db.sh
pact_broker-2.76.0 script/recreate-docker-pg-db.sh