This commit is contained in:
Cryptoval2
2025-05-16 15:48:58 +00:00
parent afeb39fc5a
commit 4e670be142
10 changed files with 0 additions and 448 deletions
+22
View File
@@ -0,0 +1,22 @@
{
"__dummy": null
, "MATTERMOST": {
"url": "https://mattermost.cryptovaltrading.com"
, "team": "CVTT"
, "bearer": "5ysaaxjeijrwjbmhuzcuos9ano"
}
, "TSDB_MD_CLD21_RO": {
"host": "cloud21.cvtt.vpn"
, "port": 5432
, "user": "cvtt_ro"
, "database": "cvtt_md"
, "password": "3Gkotqa0ZSmZLXSH3RkTUm"
}
, "TSDB_MD_CVTTDATA_RO": {
"host": "cvttdata.cvtt.vpn"
, "port": 5432
, "user": "cvtt_ro"
, "database": "cvtt_md"
, "password": "3Gkotqa0ZSmZLXSH3RkTUm"
}
}
@@ -0,0 +1,3 @@
.git
**/__pycache__
.pipenv
@@ -0,0 +1,29 @@
FROM python:3.12-slim
ARG FROM_DIR=docker_dev/market_data/md_recorder_monitor
RUN apt-get update && apt-get install -y \
apt-utils \
libpq-dev \
build-essential
COPY ${FROM_DIR}/requirements.txt /
RUN pip install --upgrade pip --root-user-action=ignore
RUN pip install -r /requirements.txt --root-user-action=ignore
COPY cvttpy /cvttpy
# COPY ${FROM_DIR}/.creds /.creds
COPY ${FROM_DIR}/run_mdr_monitor.sh /run_mdr_monitor.sh
# Shared Volumes
RUN mkdir -p /app/data
RUN mkdir /logs
RUN chmod +x /run_mdr_monitor.sh
WORKDIR /
SHELL ["/bin/bash", "-c"]
ENV PYTHONPATH=/
ENTRYPOINT [ "/run_mdr_monitor.sh" ]
@@ -0,0 +1,7 @@
aiohttp>=3.7.4.post0
nest-asyncio>=1.5.5
psycopg>=3.2.1
hjson>=3.1.0
pandas>=1.5.3
sortedcontainers>=2.4.0
redis>=5.0.8
+49
View File
@@ -0,0 +1,49 @@
#!/bin/bash
# runs in container
ValidInstances=('CLD21' 'CVTTDATA')
usage() {
echo "Usage: $0 <instance (CLD21,CVTTDATA)> [<admin_port (def. 7225)>]"
exit 1
}
is_valid() {
local inst=$1
for valid_inst in "${ValidInstances[@]}";
do
if [[ "$inst" == "$valid_inst" ]]; then
return 0
fi
done
return 1
}
Instance=${1}
if ! is_valid "${Instance}"; then
usage
fi
AdminPort=7225
if [ "${2}" != "" ]; then
AdminPort=${2}
fi
ConfigServer=cloud16.cvtt.vpn:6789
Cmd="python3.12"
Cmd="${Cmd} cvttpy/apps/md/md_rec_monitor.py"
Cmd="${Cmd} --config=http://${ConfigServer}/apps/md_rec_monitor"
Cmd="${Cmd} --db=${Instance}"
Cmd="${Cmd} --credentials_file=/.creds"
Cmd="${Cmd} --admin_port=${AdminPort}"
Cmd="${Cmd} --log_file=/logs/%T.MD_REC.MONITOR.${Instance}.log"
echo ${Cmd}
eval ${Cmd}