replacing "latest" with real docker image tag

This commit is contained in:
Oleg Sheynin 2025-03-07 23:12:38 -05:00
parent e35b15f024
commit b0a0080a4a

View File

@ -1,7 +1,7 @@
#!/bin/bash
usage() {
echo "Usage: $0 -S <symbols> [-L <LogDir>] [-d <YYYYMMDD Date>]"
echo "Usage: $0 -S <symbols> [-L <LogDir>] [-d <YYYYMMDD Date>] [-t <docker_image_tag>]"
exit 1
}
@ -45,12 +45,12 @@ export -f get_prev_business_day
# ----- Settings
DockerRegistry=cloud21.cvtt.vpn:5500
DockerImage=${DockerRegistry}/alpaca_qat #:latest
ContainerName=alpaca_qat
LogDir=/home/cvtt/prod/logs
ImageTag=0.1.7
# ----- Settings
while getopts ":d:S:L:" opt; do
while getopts ":d:S:L:t:" opt; do
case ${opt} in
d )
date_to_load=$OPTARG
@ -61,6 +61,9 @@ while getopts ":d:S:L:" opt; do
L )
LogDir=$OPTARG
;;
t )
ImageTag=$OPTARG
;;
\? )
echo "Invalid option: -$OPTARG" >&2
usage
@ -82,6 +85,8 @@ if is_container_running "$ContainerName"; then
exit 3
fi
DockerImage=${DockerRegistry}/alpaca_qat:${ImageTag} #:latest
if [ -z "${date_to_load}" ]; then
echo "date_to_load is empty"
date_to_load=$(get_prev_business_day $(date -d "yesterday" '+%Y-%m-%d'))