progress
This commit is contained in:
parent
6858685815
commit
c00cab775c
14
config_service/run.sh
Executable file
14
config_service/run.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
Cmd="docker run"
|
||||
Cmd="${Cmd} -d"
|
||||
Cmd="${Cmd} --rm"
|
||||
Cmd="${Cmd} --pull=always"
|
||||
Cmd="${Cmd} --name=cvtt_config_service"
|
||||
Cmd="${Cmd} -p 6789:6789"
|
||||
Cmd="${Cmd} -v /home/cvtt/prod/config_service/data:/app/data"
|
||||
Cmd="${Cmd} -v /home/cvtt/prod/logs:/logs"
|
||||
Cmd="${Cmd} cloud21.cvtt.vpn:5500/config_service:latest"
|
||||
|
||||
echo ${Cmd}
|
||||
eval ${Cmd}
|
||||
33
relative_liquidity/Dockerfile
Normal file
33
relative_liquidity/Dockerfile
Normal file
@ -0,0 +1,33 @@
|
||||
FROM python:3.10-slim
|
||||
|
||||
WORKDIR /
|
||||
COPY docker_dev/relative_liquidity/requirements.txt /
|
||||
RUN pip install --upgrade pip --root-user-action=ignore
|
||||
RUN pip install -r /requirements.txt --root-user-action=ignore
|
||||
|
||||
COPY cvttpy /cvttpy
|
||||
|
||||
# Shared Volumes
|
||||
RUN mkdir -p /app/data
|
||||
RUN mkdir /logs
|
||||
|
||||
ENV PYTHONPATH=/
|
||||
CMD [ \
|
||||
"python3.10", \
|
||||
"cvttpy/apps/md/rel_lqdt_server.py", \
|
||||
"--port=5678", \
|
||||
"--db_file=/app/data/rel_liquidity.db", \
|
||||
"--log_file=/logs/%%T.REL_LIQUIDITY_SVC.log" \
|
||||
]
|
||||
|
||||
|
||||
# Cmd="docker run"
|
||||
# Cmd="${Cmd} -d"
|
||||
# Cmd="${Cmd} --rm"
|
||||
# Cmd="${Cmd} --pull=always"
|
||||
# Cmd="${Cmd} --name=relative_liquidity_svc"
|
||||
# Cmd="${Cmd} -p 5678:5678"
|
||||
# Cmd="${Cmd} -v /home/cvtt/prod/data:/app/data"
|
||||
# Cmd="${Cmd} -v /home/cvtt/prod/logs:/logs"
|
||||
# Cmd="${Cmd} cloud21.cvtt.vpn:5500/relative_liquidity:latest"
|
||||
|
||||
38
relative_liquidity/HOWTO.md
Normal file
38
relative_liquidity/HOWTO.md
Normal file
@ -0,0 +1,38 @@
|
||||
```
|
||||
[program:rel_lqdt_svc]
|
||||
directory=/home/cvtt/prod
|
||||
command=/home/cvtt/.pyenv/python3.10-venv/bin/python3
|
||||
-u /home/cvtt/prod/cvttpy/apps/md/rel_lqdt_server.py
|
||||
--port=5678
|
||||
--db_file=/home/cvtt/prod/data/rel_liquidity.db
|
||||
--log_level=INFO
|
||||
--log_file=/home/cvtt/prod/logs/%%T.REL_LIQUIDITY_SVC.log
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startretries=1
|
||||
startsecs=3
|
||||
user=cvtt
|
||||
```
|
||||
|
||||
# /home/cvtt/prod/run/load_rl.sh
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
export PYTHONPATH=${HOME}/prod
|
||||
|
||||
Python=${HOME}/.pyenv/python3.10-venv/bin/python3
|
||||
Script=${HOME}/prod/cvttpy/exchanges/alpaca/hist_md/rl_calc_loader.py
|
||||
DbFile=${HOME}/prod/data/rel_liquidity.db
|
||||
Config=http://cloud16.cvtt.vpn:6789/apps/minimal_md_eqt
|
||||
|
||||
Cmd="${Python}"
|
||||
Cmd="${Cmd} ${Script}"
|
||||
Cmd="${Cmd} --config=${Config}"
|
||||
Cmd="${Cmd} --db_file=${DbFile}"
|
||||
|
||||
echo ${Cmd}
|
||||
eval ${Cmd}
|
||||
|
||||
echo Done ${0} ${*}
|
||||
```
|
||||
6
relative_liquidity/requirements.txt
Normal file
6
relative_liquidity/requirements.txt
Normal file
@ -0,0 +1,6 @@
|
||||
aiohttp>=3.7.4.post0
|
||||
nest-asyncio>=1.5.5
|
||||
numpy>=1.24.1
|
||||
hjson>=3.1.0
|
||||
pandas>=1.5.3
|
||||
# sortedcontainers>=2.4.0
|
||||
14
relative_liquidity/run.sh
Executable file
14
relative_liquidity/run.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
Cmd="docker run"
|
||||
Cmd="${Cmd} -d"
|
||||
#Cmd="${Cmd} --rm"
|
||||
Cmd="${Cmd} --pull=always"
|
||||
Cmd="${Cmd} --name=relative_liquidity_svc"
|
||||
Cmd="${Cmd} -p 5678:5678"
|
||||
Cmd="${Cmd} -v /home/cvtt/prod/data:/app/data"
|
||||
Cmd="${Cmd} -v /home/cvtt/prod/logs:/logs"
|
||||
Cmd="${Cmd} cloud21.cvtt.vpn:5500/relative_liquidity:latest"
|
||||
|
||||
echo ${Cmd}
|
||||
eval ${Cmd}
|
||||
Loading…
x
Reference in New Issue
Block a user