Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

devtools: Document process to connect to local PostgreSQL database.

Aman Agrawalf7caab11b4fc
diff --git a/templates/zerver/dev_tools.html b/templates/zerver/dev_tools.html
index 88416ac5875..ec6400fd11d 100644
--- a/templates/zerver/dev_tools.html
+++ b/templates/zerver/dev_tools.html
@@ -106,6 +106,26 @@
<p>We also have
<a href="https://zulip.readthedocs.io/en/latest/development/authentication.html">documentation on testing LDAP, Google &amp; GitHub authentication</a> in the development environment.
</p>
+ <h2>Connecting to the local PostgreSQL database</h2>
+ <ul>
+ <li><code>./manage.py dbshell</code>: Connect to
+ PostgreSQL database via your terminal.</li>
+ <li><code>provision</code> creates a <code>~/.pgpass</code> file,
+ so <code>psql -U zulip -h localhost</code> works too.</li>
+ <li>
+ <p>
+ To connect using a graphical PostgreSQL client
+ like <a href="https://www.pgadmin.org/">pgAdmin</a>,
+ use the following credentials:
+ </p>
+ <ul>
+ <li>Host: 127.0.0.1 (don't use localhost)</li>
+ <li>Maintenance database: zulip</li>
+ <li>Username: zulip</li>
+ <li>password: stored as <code>local_database_password</code> in <code>zulip/zerver/dev-secrets.conf</code></li>
+ </ul>
+ </li>
+ </ul>
</div>
</div>