config (for executor) is made more flexible, docker compose initial

This commit is contained in:
Oleg Sheynin 2024-09-09 17:39:00 -04:00
parent 0624f35ddd
commit 2c26e4d258
4 changed files with 18 additions and 10 deletions

View File

@ -1,3 +1,5 @@
BOOK=ALPACA-TEST-BOOK-01 BOOK=ALPACA-TEST-BOOK-01
CONFIG_SERVER=cloud23.cvtt.vpn:6789 CONFIG=http://cloud23.cvtt.vpn:6789/apps/cvtt_eqt_alpaca
ACTIVE_EXCHANGES=ALPACA_SNDBX-MDPORTAL ACTIVE_EXCHANGES=ALPACA_SNDBX-MDPORTAL
#
ADMIN_PORT_EXECUTOR=7222

View File

@ -2,20 +2,26 @@ version: "3.8"
#================================================== #==================================================
# Relies on the file `.env` content for varables: # Relies on the file `.env` content for varables:
# BOOK # BOOK
# CONFIG_SERVER # CONFIG
# ACTIVE_EXCHANGES # ACTIVE_EXCHANGES
# ADMIN_PORT_EXECUTOR
# Start with the command: # Start with the command:
# docker compose up -d --pull # docker compose up -d --pull
#================================================== #==================================================
services: services:
redis:
image: redis/redis-stack:latest
container_name: redis-stack
ports:
- "6379:6379"
executor: executor:
image: cloud21.cvtt.vpn:5500/executor:latest image: cloud21.cvtt.vpn:5500/executor:latest
container_name: executor.${BOOK} container_name: executor.${BOOK}
network_mode: "host" network_mode: "host"
environment:
- ADMIN_PORT=7222
restart: unless-stopped restart: unless-stopped
depends_on:
- redis
volumes: volumes:
- /opt/shared:/shared - /opt/shared:/shared
command: ["-c", "${CONFIG_SERVER}", "-e", "${ACTIVE_EXCHANGES}", "-a", "${ADMIN_PORT}"] command: ["-c", "${CONFIG}", "-e", "${ACTIVE_EXCHANGES}", "-a", "${ADMIN_PORT_EXECUTOR}"]
shm_size: "8gb" shm_size: "8gb"

View File

@ -2,7 +2,7 @@
usage() { usage() {
echo -n "Usage: $0" echo -n "Usage: $0"
echo -n " [-c <config_server (dflt: cloud23.cvtt.vpn:6789)>]" echo -n " [-c <config (dflt: http://cloud23.cvtt.vpn:6789/apps/cvtt_eqt_alpaca)>]"
echo -n " [-e <active_exchanges (ALPACA_SNDBX-MDPORTAL)>]" echo -n " [-e <active_exchanges (ALPACA_SNDBX-MDPORTAL)>]"
echo -n " [-a <admin_port (7222)>"] echo -n " [-a <admin_port (7222)>"]
echo echo
@ -11,7 +11,7 @@ usage() {
args=${*} args=${*}
ConfigServer=cloud23.cvtt.vpn:6789 Config=http://cloud23.cvtt.vpn:6789/apps/cvtt_eqt_alpaca
ActiveExchanges=ALPACA_SNDBX-MDPORTAL ActiveExchanges=ALPACA_SNDBX-MDPORTAL
AdminPort=7222 AdminPort=7222
Book="" Book=""
@ -19,7 +19,7 @@ Book=""
while getopts ":c:e:a:" opt; do while getopts ":c:e:a:" opt; do
case ${opt} in case ${opt} in
c ) c )
ConfigServer=$OPTARG Config=$OPTARG
;; ;;
e ) e )
ActiveExchanges=$OPTARG ActiveExchanges=$OPTARG
@ -38,7 +38,7 @@ while getopts ":c:e:a:" opt; do
esac esac
done done
echo "ConfigServer=${ConfigServer}" echo "Config=${Config}"
echo "ActiveExchanges=${ActiveExchanges}" echo "ActiveExchanges=${ActiveExchanges}"
echo "AdminPort=${AdminPort}" echo "AdminPort=${AdminPort}"

View File

@ -1 +1 @@
1.6.5,python 3.12, etc. 1.6.6,config (for executor) is made more flexible, docker compose initial