Got error relation "ticker" does not exist
judhizputra opened this issue · comments
Hi, i'm new to docker
When running on docker i've got this error on logs
cryptostore | Task exception was never retrieved
cryptostore | future: <Task finished name='Task-2' coro=<PostgresCallback.writer() done, defined at /usr/local/lib/python3.9/site-packages/cryptofeed/backends/postgres.py:84> exception=UndefinedTableError('relation "ticker" does not exist')>
cryptostore | Traceback (most recent call last):
cryptostore | File "/usr/local/lib/python3.9/site-packages/cryptofeed/backends/postgres.py", line 89, in writer
cryptostore | await self.write_batch(updates)
cryptostore | File "/usr/local/lib/python3.9/site-packages/cryptofeed/backends/postgres.py", line 105, in write_batch
cryptostore | await self.conn.execute(f"INSERT INTO {self.table} VALUES {args_str}")
cryptostore | File "/usr/local/lib/python3.9/site-packages/asyncpg/connection.py", line 318, in execute
cryptostore | return await self._protocol.query(query, timeout)
cryptostore | File "asyncpg/protocol/protocol.pyx", line 338, in query
cryptostore | asyncpg.exceptions.UndefinedTableError: relation "ticker" does not exist
I'm using docker-compose.yml to run cryptostore and postgres
version: '3'
services:
postgres:
cap_add:
- all
image: postgres:latest
container_name: postgres
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=Cryptostore123
- POSTGRES_USER=cryptouser
- POSTGRES_DB=cryptostore
volumes:
- ./data:/var/lib/postgresql/data
networks:
cryptostore:
cryptostore:
cap_add:
- all
image: ghcr.io/bmoscon/cryptostore:latest
container_name: cryptostore
restart: always
environment:
- EXCHANGE=COINBASE
- CHANNELS=ticker
- SYMBOLS=BTC-USD
- BACKEND=POSTGRES
- HOST=postgres
- PORT=5432
- USER=cryptouser
- PASSWORD=Cryptostore123
- DATABASE=cryptostore
networks:
cryptostore:
networks:
cryptostore:
Any help appreciated, thank you
you need to create the tables in your database