Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. $ docker ps
  2. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  3. b02d801f9aa3 development_mongo "docker-entrypoint.s…" 7 hours ago Up About an hour 0.0.0.0:50001->27017/tcp compose_mongo
  4. 2903bb830ea7 development_postgres "docker-entrypoint.s…" 7 hours ago Up About an hour 0.0.0.0:50000->5432/tcp compose_postgres
  5. 6ce3fe015a8f development_elastic "/usr/local/bin/dock…" 7 hours ago Up About an hour 0.0.0.0:50002->9200/tcp, 0.0.0.0:50003->9300/tcp compose_elastic
  6.  
  7. $ docker run --name test1 repo/myapp:stage_1605191501
  8.  
  9. Traceback (most recent call last):
  10. File "/usr/local/lib/python3.6/dist-packages/django/db/backends/base/base.py", line 217, in ensure_connection
  11. self.connect()
  12. File "/usr/local/lib/python3.6/dist-packages/django/db/backends/base/base.py", line 195, in connect
  13. self.connection = self.get_new_connection(conn_params)
  14. File "/usr/local/lib/python3.6/dist-packages/django/db/backends/postgresql/base.py", line 178, in get_new_connection
  15. connection = Database.connect(**conn_params)
  16. File "/usr/local/lib/python3.6/dist-packages/psycopg2/__init__.py", line 126, in connect
  17. conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
  18. psycopg2.OperationalError: could not connect to server: Connection refused
  19. Is the server running on host "0.0.0.0" and accepting
  20. TCP/IP connections on port 50000?
  21.  
  22. $ docker network inspect development_default | grep 'Name|IPv4'
  23. "Name": "development_default",
  24. "Name": "compose_postgres",
  25. "IPv4Address": "172.20.0.2/16",
  26. "Name": "compose_elastic",
  27. "IPv4Address": "172.20.0.4/16",
  28. "Name": "compose_mongo",
  29. "IPv4Address": "172.20.0.3/16",
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement