title: Can not connect to postgres db from datagrid
body: <p>I can't connect to postgres from datagrip(jetbrains app). I'm trying to connect, but I get this message</p>
  
  <pre><code>    Connection to postgres@172.18.0.3 failed.
  [08001] Connection to 172.18.0.3:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
  </code></pre>
  
  <p>All was well yesterday. My db is in docker container, there is yml file: </p>
  
  <pre><code>postgres_host:
      image: postgres:10-alpine
      restart: always
      ports: ["5433:5432"]
      volumes:
        - /tmp/lib:/var/lib/postgresql/data/pg_data
      environment:
        - PGDATA=/tmp/lib
  </code></pre>
  
  <p>And i can connect to db from terminal, i used select inet_server_addr( ), inet_server_port( ); And know i know host and port </p>
  
  <pre><code> inet_server_addr | inet_server_port 
  ------------------+------------------
   172.18.0.3       |             5432
  </code></pre>
  
  <p>but this information did not help me, i have same result
  <a href="https://i.stack.imgur.com/ni8Sd.png" rel="nofollow noreferrer">enter image description here</a></p>