Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- web_1 | start
- web_1 | Traceback (most recent call last):
- web_1 | File "main.py", line 110, in <module>
- web_1 | main()
- web_1 | File "main.py", line 104, in main
- web_1 | app['db'] = loop.run_until_complete(init_db())
- web_1 | File "/usr/local/lib/python3.6/asyncio/base_events.py", line 466, in run_until_complete
- web_1 | return future.result()
- web_1 | File "main.py", line 12, in init_db
- web_1 | conn = await asyncpg.connect(**DB_PARAMS)
- web_1 | File "/usr/local/lib/python3.6/site-packages/asyncpg/connection.py", line 1688, in connect
- web_1 | max_cacheable_statement_size=max_cacheable_statement_size)
- web_1 | File "/usr/local/lib/python3.6/site-packages/asyncpg/connect_utils.py", line 551, in _connect
- web_1 | raise last_error
- web_1 | File "/usr/local/lib/python3.6/site-packages/asyncpg/connect_utils.py", line 543, in _connect
- web_1 | connection_class=connection_class)
- web_1 | File "/usr/local/lib/python3.6/site-packages/asyncpg/connect_utils.py", line 513, in _connect_addr
- db_1 | done
- db_1 | server stopped
- web_1 | connector, timeout=timeout, loop=loop)
- web_1 | File "/usr/local/lib/python3.6/asyncio/tasks.py", line 352, in wait_for
- db_1 |
- db_1 | PostgreSQL init process complete; ready for start up.
- db_1 |
- web_1 | return fut.result()
- web_1 | File "/usr/local/lib/python3.6/asyncio/base_events.py", line 776, in create_connection
- web_1 | raise exceptions[0]
- web_1 | File "/usr/local/lib/python3.6/asyncio/base_events.py", line 763, in create_connection
- web_1 | yield from self.sock_connect(sock, address)
- web_1 | File "/usr/local/lib/python3.6/asyncio/selector_events.py", line 451, in sock_connect
- web_1 | return (yield from fut)
- web_1 | File "/usr/local/lib/python3.6/asyncio/selector_events.py", line 481, in _sock_connect_cb
- web_1 | raise OSError(err, 'Connect call failed %s' % (address,))
- web_1 | ConnectionRefusedError: [Errno 111] Connect call failed ('0.0.0.0', 5432)
- hlc_web_1 exited with code 1
- version: '3'
- services:
- db:
- image: postgres
- environment:
- POSTGRES_USER: ${POSTGRES_USER}
- POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
- POSTGRES_DB: ${POSTGRES_DB}
- ports:
- - "5432:5432"
- web:
- build: .
- command: python3 main.py
- volumes:
- - .:/hlcup
- - ./data:/tmp/data/
- ports:
- - "80:80"
- depends_on:
- - db
- FROM python:3.6.1
- ENV PYTHONUNBUFFERED 1
- RUN mkdir /hlcup
- WORKDIR /hlcup
- ADD requirements.txt /hlcup/
- RUN pip install --upgrade pip
- RUN pip3 install -r requirements.txt
- ADD . /hlcup/
- EXPOSE 80
- EXPOSE 5432
Add Comment
Please, Sign In to add comment