progress (UNTESTED)
This commit is contained in:
parent
b82666e434
commit
e1dd060929
@ -23,3 +23,13 @@ PXER_ADD_ARGS=
|
||||
|
||||
COORD_LOG_FILE=%T.coordinator.log
|
||||
COORD_ADD_ARGS=
|
||||
|
||||
BKPR_CREDS_FILE=
|
||||
BKPR_LOG_FILE=%T.bookkeeper.log
|
||||
BKPR_ADD_ARGS=
|
||||
|
||||
RMGR_LOG_FILE=%T.riskmrg.log
|
||||
RMGR_ADD_ARGS=
|
||||
|
||||
QUANT_LOG_FILE=%T.quant.log
|
||||
QUANT_ADD_ARGS=
|
||||
|
||||
3
microservices/bookkeeper/.dockerignore
Normal file
3
microservices/bookkeeper/.dockerignore
Normal file
@ -0,0 +1,3 @@
|
||||
.git
|
||||
**/__pycache__
|
||||
.pipenv
|
||||
25
microservices/bookkeeper/Dockerfile
Normal file
25
microservices/bookkeeper/Dockerfile
Normal file
@ -0,0 +1,25 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
# libpq needed for Timescale
|
||||
RUN apt-get update && apt-get install -y \
|
||||
apt-utils \
|
||||
libpq-dev \
|
||||
build-essential
|
||||
|
||||
COPY requirements.txt /
|
||||
|
||||
RUN pip install --upgrade pip --root-user-action=ignore
|
||||
RUN pip install -r /requirements.txt --root-user-action=ignore
|
||||
|
||||
COPY cvttpy /cvttpy
|
||||
|
||||
RUN mkdir -p /logs /config
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
ENV PYTHONPATH=/
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
16
microservices/bookkeeper/entrypoint.sh
Executable file
16
microservices/bookkeeper/entrypoint.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
LogDir=/logs
|
||||
|
||||
Cmd="python3.12"
|
||||
Cmd+=" cvttpy/apps/microservices/book_keeper/book_keeper.py"
|
||||
|
||||
Cmd+=" --config=${CONFIG_FILE}"
|
||||
Cmd+=" --log_file=${LogDir}/${BKPR_LOG_FILE}"
|
||||
Cmd+=" --credentials_file=${BKPR_CREDS_FILE:-/config/.creds}"
|
||||
|
||||
|
||||
Cmd+=" ${BKPR_ADD_ARGS}"
|
||||
echo ${Cmd}
|
||||
exec ${Cmd}
|
||||
|
||||
11
microservices/bookkeeper/requirements.txt
Normal file
11
microservices/bookkeeper/requirements.txt
Normal file
@ -0,0 +1,11 @@
|
||||
aiohttp>=3.7.4.post0
|
||||
nest-asyncio>=1.5.5
|
||||
hjson>=3.1.0
|
||||
sortedcontainers>=2.4.0
|
||||
redis>=5.0.8
|
||||
python-dateutil>=2.8.2
|
||||
types-python-dateutil>=2.8.19.6
|
||||
cryptography>=43.0.0
|
||||
PyJWT>=2.10.1
|
||||
psycopg>=3.2.1
|
||||
pandas>=1.5.3
|
||||
@ -2,7 +2,15 @@
|
||||
|
||||
# --- Settings
|
||||
RegistryService=cloud21.cvtt.vpn:5500
|
||||
ValidImages=(md_gateway oe_gateway ac_gateway pricer coordinator)
|
||||
ValidImages=(md_gateway)
|
||||
ValidImages=(oe_gateway)
|
||||
ValidImages=(ac_gateway)
|
||||
ValidImages=(pricer)
|
||||
ValidImages=(coordinator)
|
||||
ValidImages=(bookkeeper)
|
||||
ValidImages+=(risk_manager)
|
||||
ValidImages+=(quant)
|
||||
ValidImages+=(trader)
|
||||
BashFunctionCode=$(realpath $(dirname ${0}))/../dckr_bld_functions.sh
|
||||
# --- Settings
|
||||
|
||||
|
||||
@ -1,5 +1,46 @@
|
||||
# CVTT Microservices
|
||||
services:
|
||||
trader:
|
||||
image: cloud21.cvtt.vpn:5500/trader:${CVTT_VERSION}
|
||||
container_name: cvtt-trader
|
||||
pull_policy: always
|
||||
user: ${CVTT_USER:-1001:1001}
|
||||
environment:
|
||||
CONFIG_SERVICE: ${CONFIG_SERVICE:-cloud16.cvtt.vpn:6789}
|
||||
CONFIG_COMM_SETTINGS: ${CONFIG_COMM_SETTINGS:-comm/pubsub/redis/docker_microservices}
|
||||
CONFIG_FILE: ${CONFIG_FILE:-http://${CONFIG_SERVICE}/apps/cvtt_musvc}
|
||||
TRDR_LOG_FILE: ${TRDR_LOG_FILE:-%T.trader.log}
|
||||
TRDR_ADD_ARGS: ${TRDR_ADD_ARGS:-}
|
||||
volumes:
|
||||
- ./config:/config
|
||||
- ./logs:/logs
|
||||
depends_on:
|
||||
- md_gateway
|
||||
- oe_gateway
|
||||
- quant
|
||||
- bookkeeper
|
||||
- risk_manager
|
||||
- redis
|
||||
|
||||
quant:
|
||||
image: cloud21.cvtt.vpn:5500/quant:${CVTT_VERSION}
|
||||
container_name: cvtt-quant
|
||||
pull_policy: always
|
||||
user: ${CVTT_USER:-1001:1001}
|
||||
environment:
|
||||
CONFIG_SERVICE: ${CONFIG_SERVICE:-cloud16.cvtt.vpn:6789}
|
||||
CONFIG_COMM_SETTINGS: ${CONFIG_COMM_SETTINGS:-comm/pubsub/redis/docker_microservices}
|
||||
CONFIG_FILE: ${CONFIG_FILE:-http://${CONFIG_SERVICE}/apps/cvtt_musvc}
|
||||
QUANT_LOG_FILE: ${QUANT_LOG_FILE:-%T.quant.log}
|
||||
QUANT_ADD_ARGS: ${QUANT_ADD_ARGS:-}
|
||||
volumes:
|
||||
- ./config:/config
|
||||
- ./logs:/logs
|
||||
depends_on:
|
||||
- md_gateway
|
||||
- bookkeeper
|
||||
- redis
|
||||
|
||||
coordinator:
|
||||
image: cloud21.cvtt.vpn:5500/coordinator:${CVTT_VERSION}
|
||||
container_name: cvtt-coordinator
|
||||
@ -18,7 +59,7 @@ services:
|
||||
- pricer
|
||||
# - quant
|
||||
# - trader
|
||||
# - riskmgr
|
||||
- risk_manager
|
||||
- redis
|
||||
|
||||
pricer:
|
||||
@ -30,8 +71,8 @@ services:
|
||||
CONFIG_SERVICE: ${CONFIG_SERVICE:-cloud16.cvtt.vpn:6789}
|
||||
CONFIG_COMM_SETTINGS: ${CONFIG_COMM_SETTINGS:-comm/pubsub/redis/docker_microservices}
|
||||
CONFIG_FILE: ${CONFIG_FILE:-http://${CONFIG_SERVICE}/apps/cvtt_musvc}
|
||||
COORD_LOG_FILE: ${COORD_LOG_FILE:-%T.pricer.log}
|
||||
COORD_ADD_ARGS: ${COORD_ADD_ARGS:-}
|
||||
PXER_LOG_FILE: ${PXER_LOG_FILE:-%T.pricer.log}
|
||||
PXER_ADD_ARGS: ${PXER_ADD_ARGS:-}
|
||||
volumes:
|
||||
- ./config:/config
|
||||
- ./logs:/logs
|
||||
@ -39,6 +80,46 @@ services:
|
||||
- md_gateway
|
||||
- redis
|
||||
|
||||
risk_manager:
|
||||
image: cloud21.cvtt.vpn:5500/risk_manager:${CVTT_VERSION}
|
||||
container_name: cvtt-risk_manager
|
||||
pull_policy: always
|
||||
user: ${CVTT_USER:-1001:1001}
|
||||
environment:
|
||||
CONFIG_SERVICE: ${CONFIG_SERVICE:-cloud16.cvtt.vpn:6789}
|
||||
CONFIG_COMM_SETTINGS: ${CONFIG_COMM_SETTINGS:-comm/pubsub/redis/docker_microservices}
|
||||
CONFIG_FILE: ${CONFIG_FILE:-http://${CONFIG_SERVICE}/apps/cvtt_musvc}
|
||||
RMGR_LOG_FILE: ${RMGR_LOG_FILE:-%T.riskmrg.log}
|
||||
RMGR_ADD_ARGS: ${RMGR_ADD_ARGS:-}
|
||||
volumes:
|
||||
- ./config:/config
|
||||
- ./logs:/logs
|
||||
depends_on:
|
||||
- md_gateway
|
||||
- ac_gateway
|
||||
- bookkeeper
|
||||
- redis
|
||||
|
||||
|
||||
bookkeeper:
|
||||
image: cloud21.cvtt.vpn:5500/bookkeeper:${CVTT_VERSION}
|
||||
container_name: cvtt-bookkeeper
|
||||
pull_policy: always
|
||||
user: ${CVTT_USER:-1001:1001}
|
||||
environment:
|
||||
CONFIG_SERVICE: ${CONFIG_SERVICE:-cloud16.cvtt.vpn:6789}
|
||||
CONFIG_COMM_SETTINGS: ${CONFIG_COMM_SETTINGS:-comm/pubsub/redis/docker_microservices}
|
||||
CONFIG_FILE: ${CONFIG_FILE:-http://${CONFIG_SERVICE}/apps/cvtt_musvc}
|
||||
BKPR_LOG_FILE: ${BKPR_LOG_FILE:-%T.bookkeeper.log}
|
||||
BKPR_ADD_ARGS: ${BKPR_ADD_ARGS:-}
|
||||
volumes:
|
||||
- ./config:/config
|
||||
- ./logs:/logs
|
||||
depends_on:
|
||||
- ac_gateway
|
||||
#- trader
|
||||
- redis
|
||||
|
||||
md_gateway:
|
||||
image: cloud21.cvtt.vpn:5500/md_gateway:${CVTT_VERSION}
|
||||
container_name: md_gateway
|
||||
|
||||
3
microservices/quant/.dockerignore
Normal file
3
microservices/quant/.dockerignore
Normal file
@ -0,0 +1,3 @@
|
||||
.git
|
||||
**/__pycache__
|
||||
.pipenv
|
||||
19
microservices/quant/Dockerfile
Normal file
19
microservices/quant/Dockerfile
Normal file
@ -0,0 +1,19 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
COPY requirements.txt /
|
||||
|
||||
RUN pip install --upgrade pip --root-user-action=ignore
|
||||
RUN pip install -r /requirements.txt --root-user-action=ignore
|
||||
|
||||
COPY cvttpy /cvttpy
|
||||
|
||||
RUN mkdir -p /logs /config
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
ENV PYTHONPATH=/
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
14
microservices/quant/entrypoint.sh
Executable file
14
microservices/quant/entrypoint.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
LogDir=/logs
|
||||
|
||||
Cmd="python3.12"
|
||||
Cmd+=" cvttpy/apps/microservices/quant/quant.py"
|
||||
|
||||
Cmd+=" --config=${CONFIG_FILE:-/config/cvtt_musvc.cfg}"
|
||||
Cmd+=" --log_file=${LogDir}/${QUANT_LOG_FILE}"
|
||||
|
||||
Cmd+=" ${QUANT_ADD_ARGS}"
|
||||
echo ${Cmd}
|
||||
exec ${Cmd}
|
||||
|
||||
9
microservices/quant/requirements.txt
Normal file
9
microservices/quant/requirements.txt
Normal file
@ -0,0 +1,9 @@
|
||||
aiohttp>=3.7.4.post0
|
||||
nest-asyncio>=1.5.5
|
||||
hjson>=3.1.0
|
||||
sortedcontainers>=2.4.0
|
||||
redis>=5.0.8
|
||||
python-dateutil>=2.8.2
|
||||
types-python-dateutil>=2.8.19.6
|
||||
cryptography>=43.0.0
|
||||
PyJWT>=2.10.1
|
||||
3
microservices/risk_manager/.dockerignore
Normal file
3
microservices/risk_manager/.dockerignore
Normal file
@ -0,0 +1,3 @@
|
||||
.git
|
||||
**/__pycache__
|
||||
.pipenv
|
||||
19
microservices/risk_manager/Dockerfile
Normal file
19
microservices/risk_manager/Dockerfile
Normal file
@ -0,0 +1,19 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
COPY requirements.txt /
|
||||
|
||||
RUN pip install --upgrade pip --root-user-action=ignore
|
||||
RUN pip install -r /requirements.txt --root-user-action=ignore
|
||||
|
||||
COPY cvttpy /cvttpy
|
||||
|
||||
RUN mkdir -p /logs /config
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
ENV PYTHONPATH=/
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
14
microservices/risk_manager/entrypoint.sh
Executable file
14
microservices/risk_manager/entrypoint.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
LogDir=/logs
|
||||
|
||||
Cmd="python3.12"
|
||||
Cmd+=" cvttpy/apps/microservices/risk_manager/risk_manager.py"
|
||||
|
||||
Cmd+=" --config=${CONFIG_FILE}"
|
||||
Cmd+=" --log_file=${LogDir}/${RMGR_LOG_FILE}"
|
||||
|
||||
Cmd+=" ${RMGR_ADD_ARGS}"
|
||||
echo ${Cmd}
|
||||
exec ${Cmd}
|
||||
|
||||
9
microservices/risk_manager/requirements.txt
Normal file
9
microservices/risk_manager/requirements.txt
Normal file
@ -0,0 +1,9 @@
|
||||
aiohttp>=3.7.4.post0
|
||||
nest-asyncio>=1.5.5
|
||||
hjson>=3.1.0
|
||||
sortedcontainers>=2.4.0
|
||||
redis>=5.0.8
|
||||
python-dateutil>=2.8.2
|
||||
types-python-dateutil>=2.8.19.6
|
||||
cryptography>=43.0.0
|
||||
PyJWT>=2.10.1
|
||||
3
microservices/trader/.dockerignore
Normal file
3
microservices/trader/.dockerignore
Normal file
@ -0,0 +1,3 @@
|
||||
.git
|
||||
**/__pycache__
|
||||
.pipenv
|
||||
19
microservices/trader/Dockerfile
Normal file
19
microservices/trader/Dockerfile
Normal file
@ -0,0 +1,19 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
COPY requirements.txt /
|
||||
|
||||
RUN pip install --upgrade pip --root-user-action=ignore
|
||||
RUN pip install -r /requirements.txt --root-user-action=ignore
|
||||
|
||||
COPY cvttpy /cvttpy
|
||||
|
||||
RUN mkdir -p /logs /config
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
ENV PYTHONPATH=/
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
14
microservices/trader/entrypoint.sh
Executable file
14
microservices/trader/entrypoint.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
LogDir=/logs
|
||||
|
||||
Cmd="python3.12"
|
||||
Cmd+=" cvttpy/apps/microservices/trader/trader.py"
|
||||
|
||||
Cmd+=" --config=${CONFIG_FILE:-/config/cvtt_musvc.cfg}"
|
||||
Cmd+=" --log_file=${LogDir}/${TRDR_LOG_FILE}"
|
||||
|
||||
Cmd+=" ${TRDR_ADD_ARGS}"
|
||||
echo ${Cmd}
|
||||
exec ${Cmd}
|
||||
|
||||
9
microservices/trader/requirements.txt
Normal file
9
microservices/trader/requirements.txt
Normal file
@ -0,0 +1,9 @@
|
||||
aiohttp>=3.7.4.post0
|
||||
nest-asyncio>=1.5.5
|
||||
hjson>=3.1.0
|
||||
sortedcontainers>=2.4.0
|
||||
redis>=5.0.8
|
||||
python-dateutil>=2.8.2
|
||||
types-python-dateutil>=2.8.19.6
|
||||
cryptography>=43.0.0
|
||||
PyJWT>=2.10.1
|
||||
Loading…
x
Reference in New Issue
Block a user