cryptostore icon indicating copy to clipboard operation
cryptostore copied to clipboard

Provide some examples of docker-compose.yml files

Open c0indev3l opened this issue 2 years ago • 3 comments

Hello,

I wonder if some examples of docker-compose.yml files should be given to quickstart a simple cryptostore.

Kind regards

c0indev3l avatar Jul 14 '23 16:07 c0indev3l

A first example could be:

version: "3.3"
services:
  cryptostore2tty:
    image: ghcr.io/bmoscon/cryptostore:latest
    environment:
      - EXCHANGE=BINANCE
      - CHANNELS=trades
      - SYMBOLS=BTC-USDT
      - BACKEND=TTY

Usage: docker compose up Console displays

cryptostore-cryptostore-1  | 2023-07-14 17:12:10 - exchange: BINANCE symbol: BTC-USDT side: buy amount: 0.00221000 price: 31151.25000000 id: 2673492213 type: None timestamp: 1689354730.092
cryptostore-cryptostore-1  | 2023-07-14 17:12:10 - exchange: BINANCE symbol: BTC-USDT side: buy amount: 0.00219000 price: 31151.32000000 id: 2673492214 type: None timestamp: 1689354730.092
cryptostore-cryptostore-1  | 2023-07-14 17:12:10 - exchange: BINANCE symbol: BTC-USDT side: buy amount: 0.00107000 price: 31151.33000000 id: 2673492215 type: None timestamp: 1689354730.092
cryptostore-cryptostore-1  | 2023-07-14 17:12:10 - exchange: BINANCE symbol: BTC-USDT side: buy amount: 0.00033000 price: 31151.59000000 id: 2673492216 type: None timestamp: 1689354730.092
cryptostore-cryptostore-1  | 2023-07-14 17:12:10 - exchange: BINANCE symbol: BTC-USDT side: buy amount: 0.00087000 price: 31151.72000000 id: 2673492217 type: None timestamp: 1689354730.092
cryptostore-cryptostore-1  | 2023-07-14 17:12:10 - exchange: BINANCE symbol: BTC-USDT side: buy amount: 0.00081000 price: 31151.99000000 id: 2673492218 type: None timestamp: 1689354730.096
cryptostore-cryptostore-1  | 2023-07-14 17:12:10 - exchange: BINANCE symbol: BTC-USDT side: buy amount: 0.00081000 price: 31151.99000000 id: 2673492219 type: None timestamp: 1689354730.096
cryptostore-cryptostore-1  | 2023-07-14 17:12:10 - exchange: BINANCE symbol: BTC-USDT side: buy amount: 0.00347000 price: 31151.99000000 id: 2673492220 type: None timestamp: 1689354730.117
cryptostore-cryptostore-1  | 2023-07-14 17:12:10 - exchange: BINANCE symbol: BTC-USDT side: buy amount: 0.00238000 price: 31151.99000000 id: 2673492221 type: None timestamp: 1689354730.122
cryptostore-cryptostore-1  | 2023-07-14 17:12:10 - exchange: BINANCE symbol: BTC-USDT side: buy amount: 0.00174000 price: 31151.99000000 id: 2673492222 type: None timestamp: 1689354730.134
cryptostore-cryptostore-1  | 2023-07-14 17:12:10 - exchange: BINANCE symbol: BTC-USDT side: buy amount: 0.00123000 price: 31151.99000000 id: 2673492223 type: None timestamp: 1689354730.145
cryptostore-cryptostore-1  | 2023-07-14 17:12:10 - exchange: BINANCE symbol: BTC-USDT side: buy amount: 0.00123000 price: 31151.99000000 id: 2673492224 type: None timestamp: 1689354730.156
cryptostore-cryptostore-1  | 2023-07-14 17:12:10 - exchange: BINANCE symbol: BTC-USDT side: buy amount: 0.00123000 price: 31151.99000000 id: 2673492225 type: None timestamp: 1689354730.182
cryptostore-cryptostore-1  | 2023-07-14 17:12:10 - exchange: BINANCE symbol: BTC-USDT side: sell amount: 0.00162000 price: 31151.98000000 id: 2673492226 type: None timestamp: 1689354730.213
cryptostore-cryptostore-1  | 2023-07-14 17:12:10 - exchange: BINANCE symbol: BTC-USDT side: buy amount: 0.00369000 price: 31151.99000000 id: 2673492227 type: None timestamp: 1689354730.385

but data are not stored

c0indev3l avatar Jul 14 '23 17:07 c0indev3l

I tried the TCP example with

version: "3.3"
services:
  cryptostore2tcp:
    image: ghcr.io/bmoscon/cryptostore:latest
    environment:
      - EXCHANGE=COINBASE
      - CHANNELS=trades
      - SYMBOLS=BTC-USD
      - BACKEND=TCP
      - HOST=tcp://127.0.0.1
      - PORT=8080

docker compose up

and on an other console

python tcp.py

but nothing appears

c0indev3l avatar Jul 14 '23 17:07 c0indev3l

When nothing appears like this and you see nothing displaying neither on console nor in container's log it's a bit frustrating.

c0indev3l avatar Jul 14 '23 19:07 c0indev3l