Skip to content

Commit c9e1f7b

Browse files
chore: add psql instructions for Coder for Docker (coder#926)
* chore: add psql instructions for Coder for Docker * chore: edit text & formatting Co-authored-by: Eric Paulsen <ericpaulsen@coder.com>
1 parent 0ca6ba1 commit c9e1f7b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

setup/coder-for-docker/local.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,20 @@ following flags with the `docker run` command:
208208
If you're interested in using Docker as a workspace provider, please see our
209209
[deployment instructions](../../admin/workspace-providers/deployment/docker.md).
210210

211+
## Accessing the local PostgreSQL database
212+
213+
To query the local PostgreSQL database using the `psql` [terminal-based
214+
front-end](https://www.postgresql.org/docs/13/app-psql.html), follow these
215+
steps.
216+
217+
1. Run `docker ps` to get the name of the Coder container.
218+
219+
1. Exec into the Coder container and connect to the database.
220+
221+
```console
222+
docker exec -it <CODER_CONTAINER> psql --username=coder --host=0.0.0.0 --port=5433 --dbname=postgres
223+
```
224+
211225
## Known issues
212226

213227
Currently, Coder for Docker does not support:

0 commit comments

Comments
 (0)