Guest User

Untitled

a guest
Jan 4th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. web_1 | start
  2. web_1 | Traceback (most recent call last):
  3. web_1 | File "main.py", line 110, in <module>
  4. web_1 | main()
  5. web_1 | File "main.py", line 104, in main
  6. web_1 | app['db'] = loop.run_until_complete(init_db())
  7. web_1 | File "/usr/local/lib/python3.6/asyncio/base_events.py", line 466, in run_until_complete
  8. web_1 | return future.result()
  9. web_1 | File "main.py", line 12, in init_db
  10. web_1 | conn = await asyncpg.connect(**DB_PARAMS)
  11. web_1 | File "/usr/local/lib/python3.6/site-packages/asyncpg/connection.py", line 1688, in connect
  12. web_1 | max_cacheable_statement_size=max_cacheable_statement_size)
  13. web_1 | File "/usr/local/lib/python3.6/site-packages/asyncpg/connect_utils.py", line 551, in _connect
  14. web_1 | raise last_error
  15. web_1 | File "/usr/local/lib/python3.6/site-packages/asyncpg/connect_utils.py", line 543, in _connect
  16. web_1 | connection_class=connection_class)
  17. web_1 | File "/usr/local/lib/python3.6/site-packages/asyncpg/connect_utils.py", line 513, in _connect_addr
  18. db_1 | done
  19. db_1 | server stopped
  20. web_1 | connector, timeout=timeout, loop=loop)
  21. web_1 | File "/usr/local/lib/python3.6/asyncio/tasks.py", line 352, in wait_for
  22. db_1 |
  23. db_1 | PostgreSQL init process complete; ready for start up.
  24. db_1 |
  25. web_1 | return fut.result()
  26. web_1 | File "/usr/local/lib/python3.6/asyncio/base_events.py", line 776, in create_connection
  27. web_1 | raise exceptions[0]
  28. web_1 | File "/usr/local/lib/python3.6/asyncio/base_events.py", line 763, in create_connection
  29. web_1 | yield from self.sock_connect(sock, address)
  30. web_1 | File "/usr/local/lib/python3.6/asyncio/selector_events.py", line 451, in sock_connect
  31. web_1 | return (yield from fut)
  32. web_1 | File "/usr/local/lib/python3.6/asyncio/selector_events.py", line 481, in _sock_connect_cb
  33. web_1 | raise OSError(err, 'Connect call failed %s' % (address,))
  34. web_1 | ConnectionRefusedError: [Errno 111] Connect call failed ('0.0.0.0', 5432)
  35. hlc_web_1 exited with code 1
  36.  
  37. version: '3'
  38.  
  39. services:
  40. db:
  41. image: postgres
  42. environment:
  43. POSTGRES_USER: ${POSTGRES_USER}
  44. POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
  45. POSTGRES_DB: ${POSTGRES_DB}
  46. ports:
  47. - "5432:5432"
  48. web:
  49. build: .
  50. command: python3 main.py
  51. volumes:
  52. - .:/hlcup
  53. - ./data:/tmp/data/
  54. ports:
  55. - "80:80"
  56. depends_on:
  57. - db
  58.  
  59. FROM python:3.6.1
  60. ENV PYTHONUNBUFFERED 1
  61. RUN mkdir /hlcup
  62. WORKDIR /hlcup
  63. ADD requirements.txt /hlcup/
  64. RUN pip install --upgrade pip
  65. RUN pip3 install -r requirements.txt
  66. ADD . /hlcup/
  67. EXPOSE 80
  68. EXPOSE 5432
Add Comment
Please, Sign In to add comment