Docker image for Application database
This image runs PostgreSQL and creates app database and number of users:
postgres
- DB rootapp
To run it locally just use docker-compose
:
$ docker-compose up
That's all, you can connect to the running DB using psql
, DataGrip or any other tools.
To use psql
client, you need Postgres installed locally. Check out this guide for platform-dependent recommendations, but it should be as simple as an apt-get install postgresql
on Linux, brew install postgres
on OSX, or a binary download on Windows (make sure it is Postgres = 9.5).
Once properly installed, connecting to the DB server should be as simple as psql -h localhost -U app
. Verify that things are OK with something like SELECT version();
command. \q
to quit.