initial
This commit is contained in:
commit
cb0f891ace
47
.env
Normal file
47
.env
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
|
||||||
|
CVTT_DOCKER_REGISTRY=cloud16.cvtt.vpn:5543
|
||||||
|
CVTT_USER=1001:1001
|
||||||
|
CONFIG_SERVICE=cloud16.cvtt.vpn:6789
|
||||||
|
|
||||||
|
PUBSUB_SETTINGS_CONFIG_KEY=comm/pubsub/REDIS_DCKR_COMPOSE
|
||||||
|
CACHE_SETTINGS_CONFIG_KEY=comm/cache/REDIS_DCKR_COMPOSE
|
||||||
|
|
||||||
|
FRONT_GATEWAY_REST_PORT=23456
|
||||||
|
CVTT_URL=http://front_gateway:${FRONT_GATEWAY_REST_PORT}
|
||||||
|
|
||||||
|
CVTT_MUSVC_VERSION=0.6.5
|
||||||
|
|
||||||
|
CVTT_MUSVC_CONFIG=http://cloud16.cvtt.vpn:6789/apps/pairs_trading/pair_selector_musvc
|
||||||
|
# --- Shared vars
|
||||||
|
|
||||||
|
|
||||||
|
# ===== PAIR SELECTOR
|
||||||
|
PAIR_SELECTOR_VERSION=0.0.2
|
||||||
|
PAIR_SELECTOR_PYSCRIPT=/pairs_trading/apps/pair_selector.py
|
||||||
|
PAIR_SELECTOR_CONFIG=http://cloud16.cvtt.vpn:6789/apps/pairs_trading/pair_selector
|
||||||
|
PAIR_SELECTOR_LOGFILE=%T.pair_selector.log
|
||||||
|
PAIR_SELECTOR_ARGS=
|
||||||
|
PAIR_SELECTOR_REST_PORT="44320"
|
||||||
|
|
||||||
|
# ===== FRONT GATEWAY
|
||||||
|
FRONT_GW_LOG_FILE=%T.front_gateway.log
|
||||||
|
FRONT_GW_ADD_ARGS=
|
||||||
|
FRONT_GW_DEBUG=N
|
||||||
|
FRONT_GW_DEBUG_PORT=35680
|
||||||
|
FRONT_GW_DEBUG_WAIT=N
|
||||||
|
|
||||||
|
# ===== MD GATEWAY
|
||||||
|
MDGW_CREDS_FILE=/config/.creds
|
||||||
|
MDGW_LOG_FILE=%T.md_gateway.log
|
||||||
|
MDGW_ADD_ARGS=
|
||||||
|
MDGW_DEBUG=N
|
||||||
|
MDGW_DEBUG_PORT=35681
|
||||||
|
MDGW_DEBUG_WAIT=N
|
||||||
|
|
||||||
|
# ===== PRICER
|
||||||
|
PXER_CREDS_FILE=
|
||||||
|
PXER_LOG_FILE=%T.pricer.log
|
||||||
|
PXER_ADD_ARGS=
|
||||||
|
PXER_DEBUG=N
|
||||||
|
PXER_DEBUG_PORT=35684
|
||||||
|
PXER_DEBUG_WAIT=N
|
||||||
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
**/.creds
|
||||||
|
logs
|
||||||
|
data
|
||||||
159
docker-compose.yml
Normal file
159
docker-compose.yml
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
# CVTT Microservices
|
||||||
|
x-common-variables: &shared_vars
|
||||||
|
CONFIG_SERVICE: ${CONFIG_SERVICE}
|
||||||
|
CVTT_USER: ${CVTT_USER}
|
||||||
|
CVTT_URL: ${CVTT_URL}
|
||||||
|
FRONT_GATEWAY_REST_PORT: ${FRONT_GATEWAY_REST_PORT}
|
||||||
|
PUBSUB_SETTINGS_CONFIG_KEY: ${PUBSUB_SETTINGS_CONFIG_KEY}
|
||||||
|
CACHE_SETTINGS_CONFIG_KEY: ${CACHE_SETTINGS_CONFIG_KEY}
|
||||||
|
|
||||||
|
services:
|
||||||
|
pair_selector:
|
||||||
|
image: ${CVTT_DOCKER_REGISTRY}/pairs_trading:${PAIR_SELECTOR_VERSION}
|
||||||
|
container_name: pair_selector
|
||||||
|
pull_policy: always
|
||||||
|
restart: unless-stopped
|
||||||
|
user: ${CVTT_USER:-1001:1001}
|
||||||
|
|
||||||
|
environment:
|
||||||
|
<<: *shared_vars
|
||||||
|
|
||||||
|
PYTHON_SCRIPT: ${PAIR_SELECTOR_PYSCRIPT}
|
||||||
|
CONFIG_FILE: ${PAIR_SELECTOR_CONFIG}
|
||||||
|
LOG_FILE: ${PAIR_SELECTOR_LOGFILE:-}
|
||||||
|
ADD_ARGS: ${PAIR_SELECTOR_ARGS}
|
||||||
|
|
||||||
|
PAIR_SELECTOR_REST_PORT: ${PAIR_SELECTOR_REST_PORT}
|
||||||
|
ports:
|
||||||
|
- ${PAIR_SELECTOR_REST_PORT}:${PAIR_SELECTOR_REST_PORT}
|
||||||
|
volumes:
|
||||||
|
- ./config:/config
|
||||||
|
- ./logs:/logs
|
||||||
|
depends_on:
|
||||||
|
front_gateway:
|
||||||
|
condition: service_healthy
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "curl -fsS http://localhost:${PAIR_SELECTOR_REST_PORT}/ping || exit 1"]
|
||||||
|
interval: 15s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
start_period: 10s
|
||||||
|
|
||||||
|
# ------------- CVTT (Micro)Services
|
||||||
|
front_gateway:
|
||||||
|
image: ${CVTT_DOCKER_REGISTRY}/front_gateway:${CVTT_MUSVC_VERSION}
|
||||||
|
container_name: pair-sel-front_gateway
|
||||||
|
pull_policy: always
|
||||||
|
restart: unless-stopped
|
||||||
|
user: ${CVTT_USER:-1001:1001}
|
||||||
|
|
||||||
|
environment:
|
||||||
|
<<: *shared_vars
|
||||||
|
|
||||||
|
CONFIG_FILE: ${CVTT_MUSVC_CONFIG}
|
||||||
|
FRONT_GW_LOG_FILE: ${FRONT_GW_LOG_FILE:-%T.front_gateway.log}
|
||||||
|
FRONT_GW_ADD_ARGS: ${FRONT_GW_ADD_ARGS:-}
|
||||||
|
|
||||||
|
FRONT_GW_DEBUG: ${FRONT_GW_DEBUG}
|
||||||
|
FRONT_GW_DEBUG_WAIT: ${FRONT_GW_DEBUG_WAIT}
|
||||||
|
ports:
|
||||||
|
- ${FRONT_GW_DEBUG_PORT}:5678
|
||||||
|
- ${FRONT_GATEWAY_REST_PORT}:${FRONT_GATEWAY_REST_PORT}
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- ./config:/config
|
||||||
|
- ./logs:/logs
|
||||||
|
depends_on:
|
||||||
|
pricer:
|
||||||
|
condition: service_healthy
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "curl -fsS http://localhost:${FRONT_GATEWAY_REST_PORT}/ping || exit 1"]
|
||||||
|
interval: 15s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
start_period: 15s
|
||||||
|
|
||||||
|
md_gateway:
|
||||||
|
image: ${CVTT_DOCKER_REGISTRY}/md_gateway:${CVTT_MUSVC_VERSION}
|
||||||
|
container_name: pair-sel-md_gateway
|
||||||
|
pull_policy: always
|
||||||
|
restart: unless-stopped
|
||||||
|
user: ${CVTT_USER:-1001:1001}
|
||||||
|
|
||||||
|
environment:
|
||||||
|
<<: *shared_vars
|
||||||
|
|
||||||
|
CONFIG_FILE: ${CVTT_MUSVC_CONFIG}
|
||||||
|
MDGW_CREDS_FILE: ${MDGW_CREDS_FILE}
|
||||||
|
MDGW_LOG_FILE: ${MDGW_LOG_FILE:-%T.md_gateway.log}
|
||||||
|
MDGW_ADD_ARGS: ${MDGW_ADD_ARGS:-}
|
||||||
|
|
||||||
|
MDGW_DEBUG: ${MDGW_DEBUG}
|
||||||
|
MDGW_DEBUG_WAIT: ${MDGW_DEBUG_WAIT}
|
||||||
|
ports:
|
||||||
|
- ${MDGW_DEBUG_PORT}:5678
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- ./config:/config
|
||||||
|
- ./logs:/logs
|
||||||
|
depends_on:
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "/checkhealth.sh"]
|
||||||
|
interval: 15s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
start_period: 15s
|
||||||
|
|
||||||
|
pricer:
|
||||||
|
image: ${CVTT_DOCKER_REGISTRY}/pricer:${CVTT_MUSVC_VERSION}
|
||||||
|
container_name: pair-sel-pricer
|
||||||
|
pull_policy: always
|
||||||
|
restart: unless-stopped
|
||||||
|
user: ${CVTT_USER:-1001:1001}
|
||||||
|
|
||||||
|
environment:
|
||||||
|
<<: *shared_vars
|
||||||
|
|
||||||
|
CONFIG_FILE: ${CVTT_MUSVC_CONFIG}
|
||||||
|
PXER_LOG_FILE: ${PXER_LOG_FILE:-%T.pricer.log}
|
||||||
|
PXER_ADD_ARGS: ${PXER_ADD_ARGS:-}
|
||||||
|
|
||||||
|
PXER_DEBUG: ${PXER_DEBUG}
|
||||||
|
PXER_DEBUG_WAIT: ${PXER_DEBUG_WAIT}
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- ${PXER_DEBUG_PORT}:5678
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- ./config:/config
|
||||||
|
- ./logs:/logs
|
||||||
|
depends_on:
|
||||||
|
md_gateway:
|
||||||
|
condition: service_healthy
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "/checkhealth.sh"]
|
||||||
|
interval: 15s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
start_period: 15s
|
||||||
|
# ------------- System Services
|
||||||
|
redis:
|
||||||
|
image: redis:latest
|
||||||
|
container_name: pair-sel-redis
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "16379:6379"
|
||||||
|
volumes:
|
||||||
|
- ./data/redis:/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
start_period: 5s
|
||||||
|
|
||||||
|
|
||||||
4
glance.sh
Executable file
4
glance.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
docker compose ps --format 'table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Service}}' | grep -v IMAGE | sort
|
||||||
Loading…
x
Reference in New Issue
Block a user