118 lines
4.4 KiB
YAML
118 lines
4.4 KiB
YAML
version: '3.8'
|
|
|
|
# Vector Zulu — KoreID Adapter Stack v3.0
|
|
# Runs on Charlie (63.245.138.38) alongside charlie-vault-cache.
|
|
# Shares Redis and Postgres with vault cache stack.
|
|
# Auth: JWT Bearer only — no client cert required (ssl_verify_client optional).
|
|
# Primary API: korechain.korenet.cloud | Fallback: fnb.korenet.cloud
|
|
|
|
x-common-env: &common-env
|
|
REDIS_HOST: ${REDIS_HOST:-localhost}
|
|
POSTGRES_HOST: ${POSTGRES_HOST:-localhost}
|
|
POSTGRES_DB: ${POSTGRES_DB:-vz_oracle}
|
|
POSTGRES_USER: ${POSTGRES_USER:-vz_oracle}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-}
|
|
KORENET_API_URL: ${KORENET_API_URL:-https://korechain.korenet.cloud}
|
|
KORENET_API_FALLBACK: ${KORENET_API_FALLBACK:-https://fnb.korenet.cloud}
|
|
VECTOR_ZULU_RAILS_URL: ${VECTOR_ZULU_RAILS_URL:-https://vector.korenet.cloud}
|
|
|
|
x-common-volumes: &common-volumes
|
|
- /home/constellationnode/.korenet/vector-zulu/.secrets:/app/.secrets:ro
|
|
- /home/constellationnode/.korenet/vector-zulu/environment.env:/app/environment.env:ro
|
|
|
|
x-common-logging: &common-logging
|
|
driver: json-file
|
|
options:
|
|
max-size: "100m"
|
|
max-file: "3"
|
|
|
|
services:
|
|
|
|
# ── Portal Feed Poller ─────────────────────────────────────────────────────
|
|
# Polls KoreNet payment feeds and executes mirror lifecycle
|
|
vz-feed-poller:
|
|
image: python:3.12-slim
|
|
container_name: vz-feed-poller
|
|
restart: always
|
|
volumes:
|
|
- ./portal_feed_poller.py:/app/portal_feed_poller.py
|
|
- ./koreid.py:/app/koreid.py
|
|
- ./lick.py:/app/lick.py
|
|
- ./eventbus.py:/app/eventbus.py
|
|
<<: *common-volumes
|
|
working_dir: /app
|
|
command: >
|
|
sh -c "pip install requests redis psycopg2-binary azure-servicebus -q &&
|
|
python portal_feed_poller.py"
|
|
environment:
|
|
<<: *common-env
|
|
POLL_INTERVAL: "${POLL_INTERVAL:-30}"
|
|
AZURE_SERVICEBUS_CONNECTION_STRING: "${AZURE_SERVICEBUS_CONNECTION_STRING:-}"
|
|
logging: *common-logging
|
|
network_mode: host
|
|
|
|
# ── KoreChain Poster ──────────────────────────────────────────────────────
|
|
# Reads Redis queue and posts KoreID confirmations to KoreChain
|
|
vz-korechain-poster:
|
|
image: python:3.12-slim
|
|
container_name: vz-korechain-poster
|
|
restart: always
|
|
volumes:
|
|
- ./korechain_poster.py:/app/korechain_poster.py
|
|
- ./koreid.py:/app/koreid.py
|
|
- ./lick.py:/app/lick.py
|
|
<<: *common-volumes
|
|
working_dir: /app
|
|
command: >
|
|
sh -c "pip install requests redis psycopg2-binary -q &&
|
|
python korechain_poster.py"
|
|
environment:
|
|
<<: *common-env
|
|
MAX_RETRIES: "${MAX_RETRIES:-3}"
|
|
RETRY_DELAY: "${RETRY_DELAY:-30}"
|
|
POLL_INTERVAL: "${KORECHAIN_POLL_INTERVAL:-5}"
|
|
logging: *common-logging
|
|
network_mode: host
|
|
|
|
# ── Ethereum Event Listener ───────────────────────────────────────────────
|
|
# Watches SV token contracts for Mint/Burn/Transfer events
|
|
vz-eth-listener:
|
|
image: python:3.12-slim
|
|
container_name: vz-eth-listener
|
|
restart: always
|
|
volumes:
|
|
- ./eth_listener.py:/app/eth_listener.py
|
|
- ./koreid.py:/app/koreid.py
|
|
working_dir: /app
|
|
command: >
|
|
sh -c "pip install web3 requests redis psycopg2-binary -q &&
|
|
python eth_listener.py"
|
|
environment:
|
|
<<: *common-env
|
|
ETH_RPC: "${ETH_RPC:-https://eth-mainnet.g.alchemy.com/v2/nRVT_IneMUDF3Pokubawx}"
|
|
POLL_INTERVAL: "${ETH_POLL_INTERVAL:-60}"
|
|
logging: *common-logging
|
|
network_mode: host
|
|
|
|
# ── Adapter API ───────────────────────────────────────────────────────────
|
|
# Status, queue monitoring, manual injection — port 8766
|
|
vz-adapter-api:
|
|
image: python:3.12-slim
|
|
container_name: vz-adapter-api
|
|
restart: always
|
|
ports:
|
|
- "8766:8766"
|
|
volumes:
|
|
- ./adapter_api.py:/app/adapter_api.py
|
|
- ./koreid.py:/app/koreid.py
|
|
- ./lick.py:/app/lick.py
|
|
<<: *common-volumes
|
|
working_dir: /app
|
|
command: >
|
|
sh -c "pip install flask requests redis psycopg2-binary -q &&
|
|
python adapter_api.py"
|
|
environment:
|
|
<<: *common-env
|
|
logging: *common-logging
|
|
network_mode: host
|