initial
This commit is contained in:
commit
86b1a58e69
49
.env
Normal file
49
.env
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
CVTT_DOCKER_REGISTRY=cloud16.cvtt.vpn:5543
|
||||||
|
|
||||||
|
CVTT_VERSION=0.6.5
|
||||||
|
|
||||||
|
CVTT_USER=1001:1001
|
||||||
|
|
||||||
|
# --- Shared vars
|
||||||
|
CONFIG_SERVICE=cloud16.cvtt.vpn:6789
|
||||||
|
PUBSUB_SETTINGS_CONFIG_KEY=comm/pubsub/REDIS_DCKR_COMPOSE
|
||||||
|
CACHE_SETTINGS_CONFIG_KEY=comm/pubsub/REDIS_DCKR_COMPOSE
|
||||||
|
# --- Shared vars
|
||||||
|
|
||||||
|
CREDS_FILE=/config/.creds
|
||||||
|
# ====== COINBASE
|
||||||
|
COINBASE_CONFIG_FILE="http://cloud16.cvtt.vpn:6789/apps/md/ohlcv_recorder/ohlcv_rec_coinbase"
|
||||||
|
COINBASE_MDGW_LOG_FILE=%T.coinbase_mdgw.log
|
||||||
|
COINBASE_MDGW_ADD_ARGS=
|
||||||
|
|
||||||
|
COINBASE_MDGW_DEBUG=N
|
||||||
|
COINBASE_MDGW_DEBUG_PORT=45681
|
||||||
|
COINBASE_MDGW_DEBUG_WAIT=N
|
||||||
|
|
||||||
|
COINBASE_OHLCV_REC_CREDS_FILE=
|
||||||
|
COINBASE_OHLCV_REC_LOG_FILE=%T.coinbase_ohlcv_rec.log
|
||||||
|
COINBASE_OHLCV_REC_ADD_ARGS=--compress_log
|
||||||
|
|
||||||
|
COINBASE_OHLCV_REC_DEBUG=N
|
||||||
|
COINBASE_OHLCV_REC_DEBUG_PORT=45682
|
||||||
|
COINBASE_OHLCV_REC_DEBUG_WAIT=N
|
||||||
|
|
||||||
|
# ====== BNBSPOT
|
||||||
|
BNBSPOT_CONFIG_FILE="http://cloud16.cvtt.vpn:6789/apps/md/ohlcv_recorder/ohlcv_rec_bnbspot"
|
||||||
|
BNBSPOT_MDGW_LOG_FILE=%T.bnbspot_mdgw.log
|
||||||
|
BNBSPOT_MDGW_ADD_ARGS=
|
||||||
|
|
||||||
|
BNBSPOT_MDGW_DEBUG=N
|
||||||
|
BNBSPOT_MDGW_DEBUG_PORT=45683
|
||||||
|
BNBSPOT_MDGW_DEBUG_WAIT=N
|
||||||
|
|
||||||
|
BNBSPOT_OHLCV_REC_CREDS_FILE=
|
||||||
|
BNBSPOT_OHLCV_REC_LOG_FILE=%T.bnbspot_ohlcv_rec.log
|
||||||
|
BNBSPOT_OHLCV_REC_ADD_ARGS=--compress_log
|
||||||
|
|
||||||
|
BNBSPOT_OHLCV_REC_DEBUG=N
|
||||||
|
BNBSPOT_OHLCV_REC_DEBUG_PORT=45684
|
||||||
|
BNBSPOT_OHLCV_REC_DEBUG_WAIT=N
|
||||||
|
|
||||||
|
TIMESCALE_CONTAINER_NAME=cvtt-timescale-db
|
||||||
|
TIMESCALE_PORT=45433
|
||||||
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
**/.creds
|
||||||
|
logs
|
||||||
|
data
|
||||||
2
config/.dbpwds
Normal file
2
config/.dbpwds
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
CVTT_PASSWORD='dc9d2a811c19aaeabc9c98dff4b9d49d'
|
||||||
|
CVTT_RO_PASSWORD='1b02b07e135681c5a041c96d25debeb5'
|
||||||
183
docker-compose.yml
Normal file
183
docker-compose.yml
Normal file
@ -0,0 +1,183 @@
|
|||||||
|
x-common-variables: &shared_vars
|
||||||
|
CONFIG_SERVICE: ${CONFIG_SERVICE}
|
||||||
|
PUBSUB_SETTINGS_CONFIG_KEY: ${PUBSUB_SETTINGS_CONFIG_KEY}
|
||||||
|
CACHE_SETTINGS_CONFIG_KEY: ${CACHE_SETTINGS_CONFIG_KEY}
|
||||||
|
|
||||||
|
|
||||||
|
services:
|
||||||
|
# =============== C O I N B A S E
|
||||||
|
coinbase_mdgw:
|
||||||
|
image: ${CVTT_DOCKER_REGISTRY}/md_gateway:${CVTT_VERSION}
|
||||||
|
container_name: coinbase_mdgw
|
||||||
|
pull_policy: always
|
||||||
|
restart: unless-stopped
|
||||||
|
user: ${CVTT_USER:-1001:1001}
|
||||||
|
|
||||||
|
environment:
|
||||||
|
<<: *shared_vars
|
||||||
|
|
||||||
|
CONFIG_FILE: ${COINBASE_CONFIG_FILE}
|
||||||
|
MDGW_CREDS_FILE: ${CREDS_FILE}
|
||||||
|
MDGW_LOG_FILE: ${COINBASE_MDGW_LOG_FILE}
|
||||||
|
MDGW_ADD_ARGS: ${COINBASE_MDGW_ADD_ARGS:-}
|
||||||
|
|
||||||
|
MDGW_DEBUG: ${COINBASE_MDGW_DEBUG}
|
||||||
|
MDGW_DEBUG_WAIT: ${COINBASE_MDGW_DEBUG_WAIT}
|
||||||
|
ports:
|
||||||
|
- ${COINBASE_MDGW_DEBUG_PORT}:5678
|
||||||
|
volumes:
|
||||||
|
- ./config:/config
|
||||||
|
- ./logs:/logs
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "/checkhealth.sh"]
|
||||||
|
interval: 15s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
start_period: 15s
|
||||||
|
|
||||||
|
coinbase_ohlcv_rec:
|
||||||
|
image: ${CVTT_DOCKER_REGISTRY}/ohlcv_recorder:${CVTT_VERSION}
|
||||||
|
container_name: coinbase_ohlcv_rec
|
||||||
|
pull_policy: always
|
||||||
|
restart: unless-stopped
|
||||||
|
user: ${CVTT_USER:-1001:1001}
|
||||||
|
|
||||||
|
environment:
|
||||||
|
<<: *shared_vars
|
||||||
|
|
||||||
|
CONFIG_FILE: ${COINBASE_CONFIG_FILE}
|
||||||
|
OHLCV_REC_LOG_FILE: ${COINBASE_OHLCV_REC_LOG_FILE}
|
||||||
|
OHLCV_REC_ADD_ARGS: ${COINBASE_OHLCV_REC_ADD_ARGS:-}
|
||||||
|
|
||||||
|
OHLCV_REC_DEBUG: ${COINBASE_OHLCV_REC_DEBUG}
|
||||||
|
OHLCV_REC_DEBUG_WAIT: ${COINBASE_OHLCV_REC_DEBUG_WAIT}
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- ${COINBASE_OHLCV_REC_DEBUG_PORT}:5678
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- ./config:/config
|
||||||
|
- ./logs:/logs
|
||||||
|
depends_on:
|
||||||
|
coinbase_mdgw:
|
||||||
|
condition: service_healthy
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
timescaledb:
|
||||||
|
condition: service_healthy
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "/checkhealth.sh"]
|
||||||
|
interval: 15s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
start_period: 15s
|
||||||
|
|
||||||
|
# =============== B N B S P O T
|
||||||
|
bnbspot_mdgw:
|
||||||
|
image: ${CVTT_DOCKER_REGISTRY}/md_gateway:${CVTT_VERSION}
|
||||||
|
container_name: bnbspot_mdgw
|
||||||
|
pull_policy: always
|
||||||
|
restart: unless-stopped
|
||||||
|
user: ${CVTT_USER:-1001:1001}
|
||||||
|
|
||||||
|
environment:
|
||||||
|
<<: *shared_vars
|
||||||
|
|
||||||
|
CONFIG_FILE: ${BNBSPOT_CONFIG_FILE}
|
||||||
|
MDGW_CREDS_FILE: ${CREDS_FILE}
|
||||||
|
MDGW_LOG_FILE: ${BNBSPOT_MDGW_LOG_FILE}
|
||||||
|
MDGW_ADD_ARGS: ${BNBSPOT_MDGW_ADD_ARGS:-}
|
||||||
|
|
||||||
|
MDGW_DEBUG: ${BNBSPOT_MDGW_DEBUG}
|
||||||
|
MDGW_DEBUG_WAIT: ${BNBSPOT_MDGW_DEBUG_WAIT}
|
||||||
|
ports:
|
||||||
|
- ${BNBSPOT_MDGW_DEBUG_PORT}:5678
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- ./config:/config
|
||||||
|
- ./logs:/logs
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "/checkhealth.sh"]
|
||||||
|
interval: 15s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
start_period: 15s
|
||||||
|
|
||||||
|
bnbspot_ohlcv_rec:
|
||||||
|
image: ${CVTT_DOCKER_REGISTRY}/ohlcv_recorder:${CVTT_VERSION}
|
||||||
|
container_name: bnbspot_ohlcv_rec
|
||||||
|
pull_policy: always
|
||||||
|
restart: unless-stopped
|
||||||
|
user: ${CVTT_USER:-1001:1001}
|
||||||
|
|
||||||
|
environment:
|
||||||
|
<<: *shared_vars
|
||||||
|
|
||||||
|
CONFIG_FILE: ${BNBSPOT_CONFIG_FILE}
|
||||||
|
OHLCV_REC_LOG_FILE: ${BNBSPOT_OHLCV_REC_LOG_FILE}
|
||||||
|
OHLCV_REC_ADD_ARGS: ${BNBSPOT_OHLCV_REC_ADD_ARGS:-}
|
||||||
|
|
||||||
|
OHLCV_REC_DEBUG: ${BNBSPOT_OHLCV_REC_DEBUG}
|
||||||
|
OHLCV_REC_DEBUG_WAIT: ${BNBSPOT_OHLCV_REC_DEBUG_WAIT}
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- ${BNBSPOT_OHLCV_REC_DEBUG_PORT}:5678
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- ./config:/config
|
||||||
|
- ./logs:/logs
|
||||||
|
depends_on:
|
||||||
|
bnbspot_mdgw:
|
||||||
|
condition: service_healthy
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
timescaledb:
|
||||||
|
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: cvtt-redis-md_rec
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "26379:6379"
|
||||||
|
volumes:
|
||||||
|
- ./data/redis:/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
start_period: 5s
|
||||||
|
|
||||||
|
timescaledb:
|
||||||
|
image: ${CVTT_DOCKER_REGISTRY}/cvtt-timescale-db:${CVTT_VERSION}
|
||||||
|
container_name: ${TIMESCALE_CONTAINER_NAME}
|
||||||
|
restart: unless-stopped
|
||||||
|
pull_policy: always
|
||||||
|
# ----
|
||||||
|
environment:
|
||||||
|
- POSTGRES_PASSWORD=postgres
|
||||||
|
- POSTGRES_USER=postgres
|
||||||
|
- POSTGRES_DB=postgres
|
||||||
|
ports:
|
||||||
|
- "${TIMESCALE_PORT}:5432"
|
||||||
|
volumes:
|
||||||
|
- ./data/timescale-db:/var/lib/postgresql/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U postgres -h localhost -p 5432"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
start_period: 15s
|
||||||
|
|
||||||
3
glance.sh
Executable file
3
glance.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/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