From 190d44a6d7adbaf304a2dbc2bfb8c706302a91af Mon Sep 17 00:00:00 2001 From: Oleg Sheynin Date: Fri, 19 Jan 2024 17:14:02 -0500 Subject: [PATCH] progress --- deploy.sh | 1 + executor/Dockerfile | 18 +++++++++--------- quant/.creds | 27 +++++++++++++++++---------- quant/Dockerfile | 20 +++++++++----------- quant/requirements.txt | 6 +++++- 5 files changed, 41 insertions(+), 31 deletions(-) diff --git a/deploy.sh b/deploy.sh index a240e5c..1094e13 100755 --- a/deploy.sh +++ b/deploy.sh @@ -10,6 +10,7 @@ LogDir=/home/cvtt/prod/logs mkdir -p ${LogDir} +docker stop ${ImageName} docker image rm -f ${ImageName}:* docker rm -f ${ImageName} docker load -i ${ImageDir}/${ImageName}.img.tar diff --git a/executor/Dockerfile b/executor/Dockerfile index b1de69d..5eae005 100644 --- a/executor/Dockerfile +++ b/executor/Dockerfile @@ -15,15 +15,15 @@ RUN mkdir /logs ENV PYTHONPATH=/ # default config -ENV CONFIG=http://cloud16.cvtt.vpn:6789/apps/cvtt +# ENV CONFIG=http://cloud16.cvtt.vpn:6789/apps/cvtt -CMD [ \ - "python3.10", \ - "cvttpy/apps/executor_app.py", \ - "--config=${CONFIG}", \ - "--admin_port=7220", \ - "--active_exchanges=COINBASE_AT", \ - "--credentials_file=/.creds", \ - "--log_file=/logs/%T.EXECUTOR_APP.log" \ +CMD [ \ + "python3.10", \ + "cvttpy/apps/executor_app.py", \ + "--config=http://cloud16.cvtt.vpn:6789/apps/cvtt", \ + "--admin_port=7220", \ + "--active_exchanges=COINBASE_AT", \ + "--credentials_file=/.creds", \ + "--log_file=/logs/%T.EXECUTOR_APP.log" \ ] diff --git a/quant/.creds b/quant/.creds index c4e3a39..137def0 100644 --- a/quant/.creds +++ b/quant/.creds @@ -1,14 +1,21 @@ { - "COINBASE_ADV_TRD": { - "api_key": "nKIyZxS95J4MsY4N" - , "secret_key": "sih7Txx3htlTWJrQ3EiuRS3qRfv7qZ4P" - , "account_uuid": "???" - , "book_id": "CVTT_BK01" + "TSDB_MD_CLD19_RO": { + "host": "cloud19.cvtt.vpn" + , "port": 5432 + , "user": "cvtt_ro" + , "database": "cvtt_md" + , "password": "3Gkotqa0ZSmZLXSH3RkTUm" } - , "COINBASE_ADV_RO": { - "api_key": "Ip4QpRtRHBmWNpc3" - , "secret_key": "N6ZEMdIdUYUldkJRTUcCRKUFot4Fp2j0" - , "account_uuid": "???" - , "book_id": "CVTT_BK01" + , "TSDB_MD_CVTTDATA_RO": { + "host": "cvttdata.cvtt.vpn" + , "port": 5432 + , "user": "cvtt_ro" + , "database": "cvtt_md" + , "password": "3Gkotqa0ZSmZLXSH3RkTUm" + } + , "MATTERMOST": { + "url": "https://cloud11.cryptovaltrading.com" + , "team": "CVTT" + , "bearer": "5ysaaxjeijrwjbmhuzcuos9ano" } } diff --git a/quant/Dockerfile b/quant/Dockerfile index 7e812c6..a6edaf3 100644 --- a/quant/Dockerfile +++ b/quant/Dockerfile @@ -17,17 +17,15 @@ ENV PYTHONPATH=/ # default config ENV CONFIG=http://cloud16.cvtt.vpn:6789/apps/cvtt ENV BOOK_ID=CVTT_CLD17_BK01 -# ENV INSTRUMENTS="COINBASE:PAIR-BTC-USD" -CMD [ \ - "python3.10", \ - "cvttpy/apps/quant_app.py", \ - "--config=${CONFIG}", \ - "--credentials_file=/.creds", \ - "--active_exchanges=COINBASE_AT", \ - # "--instruments=${INSTRUMENTS}", \ +CMD [ \ + "python3.10", \ + "cvttpy/apps/quant_app.py", \ + "--config=http://cloud16.cvtt.vpn:6789/apps/cvtt", \ + "--credentials_file=/.creds", \ + "--active_exchanges=COINBASE_AT", \ "--instruments=COINBASE:PAIR-BTC-USD", \ - "--book=${BOOK_ID}" \ - "--admin_port=7221", \ - "--log_file=/logs/%T.QUANT.log" \ + "--book=CVTT_CLD17_BK01", \ + "--admin_port=7221", \ + "--log_file=/logs/%T.QUANT.log" \ ] diff --git a/quant/requirements.txt b/quant/requirements.txt index d43cacf..02a8cd1 100644 --- a/quant/requirements.txt +++ b/quant/requirements.txt @@ -2,5 +2,9 @@ aiohttp>=3.7.4.post0 aioredis>=2.0.1 nest-asyncio>=1.5.5 hjson>=3.1.0 -# sortedcontainers>=2.4.0 +sortedcontainers>=2.4.0 pandas>=1.5.3 +# +ta>=0.10.2 +tables>=3.9.1 +asyncpg>=0.27.0 \ No newline at end of file