https://www.docker.com/docker-mac
Run the following commands
localip=$(ifconfig | grep "inet " | grep -v 127.0.0.1 | cut -d\ -f2)
dburl=postgres://[email protected]:5432/turtle_dev
docker rm hero
docker run -ti -e DATABASE_URL=$dburl --add-host=docker.local:$localip -p 8080:8080 --name hero ankane/pghero
Edit the configuration file in postgres to allow all ips
listen_addresses = '*'
in thepostgresql.conf
file. Make sure to uncomment it.- Make sure you have the following entry in
pg_hba.conf
:
# TYPE DATABASE USER ADDRESS METHOD
host all all 0.0.0.0/0 trust
- Restart server
open http://localhost:8080