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
CONFIG_SERVER=cloud23.cvtt.vpn:6789
CONFIG=http://cloud23.cvtt.vpn:6789/apps/cvtt_eqt_alpaca
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:
# BOOK
# CONFIG_SERVER
# CONFIG
# ACTIVE_EXCHANGES
# ADMIN_PORT_EXECUTOR
# Start with the command:
# docker compose up -d --pull
#==================================================
services:
redis:
image: redis/redis-stack:latest
container_name: redis-stack
ports:
- "6379:6379"
executor:
image: cloud21.cvtt.vpn:5500/executor:latest
container_name: executor.${BOOK}
network_mode: "host"
environment:
- ADMIN_PORT=7222
restart: unless-stopped
depends_on:
- redis
volumes:
- /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"

View File

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