- docker installed
- docker-compose installed
git clone https://github.com/jforge/compose-postgres.git
cd compose-postgres
docker-compose up
- postgres running on 5432
- user:
postgres
- password:
changeme
- user:
- pgadmin4 running on 5050
- user:
pgadmin4@pgadmin.org
- password:
admin
- user:
Use hostname postgres
for a local connection configured in pgadmin4
By default this composition expects path ~/data/postgres
to be mapped to /data/postgres
(container).
In order to change this on a MacOS properly, follow the Docker for Mac :: File system sharing (osxfs) docs.
use the restore_db.sh
script with a dump as an argument to restore a database into the dockerized postgresql server.