160 lines
4.6 KiB
YAML
160 lines
4.6 KiB
YAML
# 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
|
|
|
|
|