DEV Community

Discussion on: Postgres up and running in less than 3 minutes with docker-compose 🚀

Collapse
 
timbogdanov profile image
Tim Bogdanov

question:
my set up is very similar, when booting up the container, and logining into psql with username db and host it create a different ip address for the database container every time, in the env of my project id have to constently change this. How could I hardcode localhost in the postgres docker-compose.yaml file, so that when ever i boot up the containers the db container will always host at 127.0.0.1?