Key | Description | Default |
---|---|---|
DB_HOST |
The database hostname | localhost |
DB_PORT |
The database port | 5432 |
DB_USER |
The database user | N/A |
DB_PASS |
The database password | N/A |
DB_NAME |
The database name | N/A |
SLEEP_INF |
Sleep infinitely when done | true |
If you want to test if you can connect to a postgres db locally with docker you can try this,
docker run --rm -it \
-e DB_USER=myuser \
-e DB_PASS=mypassword \
-e DB_NAME=mydb \
ghcr.io/phillezi/test-psql-conn:latest
Note
The above command will try to connect to a postgres db called mydb
with the user myuser
and password mypassword
hosted on the host machine (172.17.0.1:5432).