@@ -70,8 +70,8 @@ db-bootstrap:
7070
7171.PHONY : db-teardown
7272db-teardown :
73- dropdb cpic -h localhost -U postgres
74- psql -X -q -h localhost -U postgres -c " drop user cpic"
73+ dropdb cpic -h ${PGHOST} -U postgres
74+ psql -X -q -h ${PGHOST} -U postgres -c " drop user cpic"
7575
7676.PHONY : db-init
7777db-init : db-bootstrap db-update db-migrate
@@ -84,8 +84,8 @@ db-download:
8484
8585.PHONY : db-refresh
8686db-refresh :
87- dropdb cpic -h localhost -U postgres && createdb cpic -h localhost -U postgres -O cpic
88- gzip -cd out/cpic_db_dump.sql.gz | psql -d cpic -h localhost -U cpic
87+ dropdb cpic -h ${PGHOST} -U postgres && createdb cpic -h ${PGHOST} -U postgres -O cpic
88+ gzip -cd out/cpic_db_dump.sql.gz | psql -d cpic -h ${PGHOST} -U cpic
8989
9090.PHONY : db-update
9191db-update : db-download db-refresh
@@ -94,8 +94,8 @@ db-update: db-download db-refresh
9494.PHONY : db-update-staging
9595db-update-staging :
9696 @echo " Database image copied and refreshed"
97- dropdb cpic-staging -h localhost -U postgres
98- createdb cpic-staging -h localhost -U postgres
97+ dropdb cpic-staging -h ${PGHOST} -U postgres
98+ createdb cpic-staging -h ${PGHOST} -U postgres
9999 pg_dump cpic | psql cpic-staging
100100
101101.PHONY : db-migrate
@@ -119,7 +119,7 @@ clean:
119119
120120.PHONY : db-clean
121121db-clean :
122- psql -h localhost -U postgres -c " drop database cpic; drop role web_anon; drop role cpic_api; drop role auth; drop role cpic;"
122+ psql -h ${PGHOST} -U postgres -c " drop database cpic; drop role web_anon; drop role cpic_api; drop role auth; drop role cpic;"
123123
124124
125125.PHONY : import
0 commit comments