Skip to content

Commit

Permalink
Update instruction to get into postgres shell from inside docker. (#103)
Browse files Browse the repository at this point in the history
* Update instruction to get into postgres shell.

* Add alternative command to access postgres shell.

Added an alternative way to access postgres shell without getting into docker shell as suggested by sarthak-19.
  • Loading branch information
AhmarZaidi authored Jan 27, 2023
1 parent 737f96e commit 194ff0e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,15 @@ Install latest **pm2** with :
| ``-d``| Run container in background and print container ID|
- To Get the running log of the docker container created -
`` docker logs --follow myPostgresDb``
- To Get into postgreSQL Shell -
`` docker exec -it myPostgresDb bash``
- To Get into postgreSQL Shell (There are two ways this can be done) -
- First get into docker shell using - `` docker exec -it myPostgresDb bash``
<br>Then get into postgreSQL shell using - `` psql -U postgresUser postgresDB``

OR

- Alternatively postgres shell can also be assessed directly (without getting into the docker shell) -
`` psql -U postgresUser -d postgresDB -p 5455 -h localhost``
and put in ``postgresPW`` when prompted for password.
- After logging into postgreSQL shell follow the [Post-Installation](https://github.com/apache/age#post-installation) instruction to create a graph in the database.
### Connect Apache Age-Viewer to PostgreSQL Database
**Initial Connection Layout**
Expand Down

1 comment on commit 194ff0e

@Tekhunt
Copy link

@Tekhunt Tekhunt commented on 194ff0e Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • You can also use the -W option to psql to prompt for the password at connection time, without having to type it in the command line like below:

docker exec -it myPostgresDb psql -U postgresUser -W postgresDB

Please sign in to comment.