I do

```
postgres -D /path/to/data

```

I get

```
2017-05-01 16:53:36 CDT LOG:  could not bind IPv6 socket: No error
2017-05-01 16:53:36 CDT HINT:  Is another postmaster already running on port 
5432? If not, wait a few seconds and retry.
2017-05-01 16:53:36 CDT LOG:  could not bind IPv4 socket: No error
2017-05-01 16:53:36 CDT HINT:  Is another postmaster already running on port 
5432? If not, wait a few seconds and retry.
2017-05-01 16:53:36 CDT WARNING:  could not create listen socket for "*"
2017-05-01 16:53:36 CDT FATAL:  could not create any TCP/IP sockets

```

Can someone help me figure out what is going wrong?

When I do 

```
psql -U postgres -h localhost

```

it works just fine. 

Though I need to start postgres to get it running on Docker and Django

Please help

Thanks in advance

Edit: 

When I do 

```
docker-compose up 

```

I get

```
$ docker-compose up
Starting asynchttpproxy_postgres_1
Starting asynchttpproxy_web_1
Attaching to asynchttpproxy_postgres_1, asynchttpproxy_web_1
postgres_1  | LOG:  database system was interrupted; last known up at 2017-

05-01 21:27:43 UTC
postgres_1  | LOG:  database system was not properly shut down; automatic recovery in progress
postgres_1  | LOG:  invalid record length at 0/150F720: wanted 24, got 0
postgres_1  | LOG:  redo is not required
postgres_1  | LOG:  MultiXact member wraparound protections are now enabled
postgres_1  | LOG:  database system is ready to accept connections
web_1       | Performing system checks...
web_1       |
web_1       | System check identified no issues (0 silenced).
web_1       | Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7f51f88bef28>
web_1       | Traceback (most recent call last):
web_1       |   File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
web_1       |     self.connect()
web_1       |   File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 119, in connect
web_1       |     self.connection = self.get_new_connection(conn_params)
web_1       |   File "/usr/local/lib/python3.6/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 176, in get_new_connection
web_1       |     connection = Database.connect(**conn_params)
web_1       |   File "/usr/local/lib/python3.6/site-packages/psycopg2/__init__.py", line 164, in connect
web_1       |     conn = _connect(dsn, connection_factory=connection_factory, async=async)
web_1       | psycopg2.OperationalError: could not connect to server: Connection refused
web_1       |   Is the server running on host "localhost" (127.0.0.1) and accepting
web_1       |   TCP/IP connections on port 5432?
web_1       | could not connect to server: Cannot assign requested address
web_1       |   Is the server running on host "localhost" (::1) and accepting
web_1       |   TCP/IP connections on port 5432?

```