This commit is contained in:
2024-12-20 13:47:06 -05:00
parent 539034a93c
commit 98146f0fc0
27 changed files with 5 additions and 5 deletions
@@ -0,0 +1,26 @@
FROM python:3.12-slim
ARG FROM_DIR=docker_dev/trading/service_checker
RUN apt-get update && apt-get install -y telnet redis-tools
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_svc_checker.sh /run_svc_checker.sh
RUN chmod +x /run_svc_checker.sh
# RUN mkdir /logs
WORKDIR /
SHELL ["/bin/bash", "-c"]
ENV PYTHONPATH=/
ENTRYPOINT [ "/run_svc_checker.sh" ]
# ENTRYPOINT [ "/usr/bin/bash" ]
@@ -0,0 +1,7 @@
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
+41
View File
@@ -0,0 +1,41 @@
#!/bin/bash
# runs in container
# runs on host to start container
usage() {
echo -n "Usage: ${0}"
echo -n " [-c <config (dflt: http://cloud23.cvtt.vpn:6789/apps/cvtt_eqt_alpaca)>]"
echo
exit 1
}
Config=http://cloud23.cvtt.vpn:6789/apps/cvtt_eqt_alpaca
while getopts ":c:" opt; do
case ${opt} in
c )
Config=$OPTARG
;;
\? )
echo "Invalid option: -$OPTARG" >&2
usage
;;
: )
echo "Option -$OPTARG requires an argument." >&2
usage
;;
esac
done
Cmd="python3.12"
Cmd="${Cmd} cvttpy/apps/utils/services_checker.py"
Cmd="${Cmd} --config=${Config}"
Cmd="${Cmd} --credentials_file=/.creds"
Cmd="${Cmd} --log_level=ERROR"
echo ${Cmd}
eval ${Cmd}