Skip to content

Commit

Permalink
Whoops, postgres:9.6.6 didn't go away, dockerhub is just not working …
Browse files Browse the repository at this point in the history
…for circleci.
  • Loading branch information
kurtwheeler committed Oct 30, 2018
1 parent 5be8b42 commit a4bb90b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions common/install_db_docker.sh
@@ -1,8 +1,8 @@
#! /bin/bash

docker run -it -e PGPASSWORD=mysecretpassword --rm --link drdb:postgres postgres:9.6 psql -c "create database data_refinery" -h postgres -U postgres
docker run -it -e PGPASSWORD=mysecretpassword --rm --link drdb:postgres postgres:9.6 psql -c "CREATE ROLE data_refinery_user WITH LOGIN PASSWORD 'data_refinery_password';" -h postgres -U postgres
docker run -it -e PGPASSWORD=mysecretpassword --rm --link drdb:postgres postgres:9.6 psql -c 'GRANT ALL PRIVILEGES ON DATABASE data_refinery TO data_refinery_user;' -h postgres -U postgres
docker run -it -e PGPASSWORD=mysecretpassword --rm --link drdb:postgres postgres:9.6 psql -c 'ALTER USER data_refinery_user CREATEDB;' -h postgres -U postgres
docker run -it -e PGPASSWORD=mysecretpassword --rm --link drdb:postgres postgres:9.6 psql -c 'ALTER ROLE data_refinery_user superuser;' -h postgres -U postgres
docker run -it -e PGPASSWORD=mysecretpassword --rm --link drdb:postgres postgres:9.6 psql -c 'CREATE EXTENSION IF NOT EXISTS hstore;' -h postgres -U postgres -d data_refinery
docker run -it -e PGPASSWORD=mysecretpassword --rm --link drdb:postgres postgres:9.6.6 psql -c "create database data_refinery" -h postgres -U postgres
docker run -it -e PGPASSWORD=mysecretpassword --rm --link drdb:postgres postgres:9.6.6 psql -c "CREATE ROLE data_refinery_user WITH LOGIN PASSWORD 'data_refinery_password';" -h postgres -U postgres
docker run -it -e PGPASSWORD=mysecretpassword --rm --link drdb:postgres postgres:9.6.6 psql -c 'GRANT ALL PRIVILEGES ON DATABASE data_refinery TO data_refinery_user;' -h postgres -U postgres
docker run -it -e PGPASSWORD=mysecretpassword --rm --link drdb:postgres postgres:9.6.6 psql -c 'ALTER USER data_refinery_user CREATEDB;' -h postgres -U postgres
docker run -it -e PGPASSWORD=mysecretpassword --rm --link drdb:postgres postgres:9.6.6 psql -c 'ALTER ROLE data_refinery_user superuser;' -h postgres -U postgres
docker run -it -e PGPASSWORD=mysecretpassword --rm --link drdb:postgres postgres:9.6.6 psql -c 'CREATE EXTENSION IF NOT EXISTS hstore;' -h postgres -U postgres -d data_refinery
4 changes: 2 additions & 2 deletions run_postgres.sh
Expand Up @@ -20,8 +20,8 @@ if [[ $(docker ps -a --filter name=drdb -q) ]]; then
# Otherwise, install it from docker hub
else
# via https://hub.docker.com/_/postgres/
# 9.6 is the current (as of Jan 23 2018) RDS most recent version.
# 9.6.6 is the current (as of Jan 23 2018) RDS most recent version.
# Password can be exposed to git/CI because this is only for dev/testing purposes, not real data.
echo "Installing database..."
docker run -p 5432:5432 --name drdb -v "$VOLUMES":/var/lib/postgresql/data -e POSTGRES_PASSWORD=mysecretpassword -d postgres:9.6
docker run -p 5432:5432 --name drdb -v "$VOLUMES":/var/lib/postgresql/data -e POSTGRES_PASSWORD=mysecretpassword -d postgres:9.6.6
fi
2 changes: 1 addition & 1 deletion run_psql_shell.sh
@@ -1,2 +1,2 @@
#! /bin/bash
docker run -it -e PGPASSWORD=mysecretpassword --rm --link drdb:postgres postgres:9.6 psql -h postgres -U postgres -d data_refinery
docker run -it -e PGPASSWORD=mysecretpassword --rm --link drdb:postgres postgres:9.6.6 psql -h postgres -U postgres -d data_refinery

0 comments on commit a4bb90b

Please sign in to comment.