title: Docker - Define ip of the image on localhost not 0.0.0.0
body: <p>I'm trying to connect a PostgreSQL db with Spring Boot project and VueJS project.
  But when I run my docker compose, I see this on my inspect window of my image  (Postgresql):
  <a href="https://i.stack.imgur.com/48piq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/48piq.png" alt="enter image description here" /></a></p>
  <p>My ip address of my db is 0.0.0.0 and not localhost. In my Spring Boot Project, I have specified my db with the adress localhost. Consequently, when my spring boot project try to run, i have the following error :</p>
  <pre><code> org.postgresql.util.PSQLException: The connection attempt failed.
  </code></pre>
  <p>I would like to define the ip adress to localhost for my db and my spring boot project.</p>
  <p>My docker compose file :</p>
  <pre><code>version: '1'
  services:
    db:
      image: postgres
      restart: always
      environment:
        POSTGRES_USER: &lt;user&gt;
        POSTGRES_PASSWORD: &lt;pass&gt;
        POSTGRES_DB: &lt;db_name&gt;
      ports:
        - 5432:5432
    back:
      image: 'dependency_check_back'
      build:
        context: .
      container_name: back
      depends_on:
        - db
    front:
      build: ./front
      image: dependency_check_front
      container_name: front
      ports:
        - 8080:80
  </code></pre>