Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Fix `pgcli` just commands for the api and catalog (#1822)

Krystle Salazar88409cb3391b
diff --git a/api/justfile b/api/justfile
index c67cac41b..07dfc9bec 100644
--- a/api/justfile
+++ b/api/justfile
@@ -64,9 +64,9 @@ _curl-get path host="localhost:50280":
stats media="images" host="localhost:50280":
just _curl-get "{{ media }}/stats/" {{ host }}
-# Launch a `pgcli` shell in the web container (requires typing credentials)
-pgcli db_host="db" db_name="openledger" db_user="deploy":
- env DC_USER="opener" just ../exec web pgcli -h {{ db_host }} openledger
+# Launch a `pgcli` shell in the web container
+pgcli db_host="db" db_port="5432" db_name="openledger" db_user="deploy" db_password="deploy": up
+ env DC_USER="opener" just ../exec web pgcli postgresql://{{ db_user }}:{{ db_password }}@{{ db_host }}:{{ db_port }}/{{ db_name }}
#########################
# Django administration #
diff --git a/catalog/justfile b/catalog/justfile
index 8c2062abb..f6c0ac54b 100644
--- a/catalog/justfile
+++ b/catalog/justfile
@@ -79,9 +79,9 @@ ipython: up-deps
{{ SERVICE }} \
bash -c \'ipython\'
-# Launch a `pgcli` shell in the PostgreSQL container (requires typing credentials)
-pgcli db_host="postgres" db_name="openledger" db_user="airflow":
- just ../exec postgres pgcli -h {{ db_host }} {{ db_name }} {{ db_user }}
+# Launch a `pgcli` shell in the PostgreSQL container
+pgcli db_host="upstream_db" db_port="5432" db_name="openledger" db_user="airflow" db_password="airflow": up
+ just ../exec upstream_db pgcli postgresql://{{ db_user }}:{{ db_password }}@{{ db_host }}:{{ db_port }}/{{ db_name }}
#########
# Tests #