Add docker-compose.yml
This commit is contained in:
73
docker-compose.yml
Normal file
73
docker-compose.yml
Normal file
@@ -0,0 +1,73 @@
|
||||
version: '3.8'
|
||||
|
||||
# Vector Zulu — KoreID Translation Layer
|
||||
# Converts Ethereum events to KoreID format and posts back to KoreChain.
|
||||
# Runs on Charlie (63.245.138.38) alongside charlie-vault-cache.
|
||||
# Shares the same Redis and Postgres instances.
|
||||
|
||||
services:
|
||||
|
||||
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 redis psycopg2-binary -q && python eth_listener.py"
|
||||
environment:
|
||||
ETH_RPC: ${ETH_RPC:-https://eth-mainnet.g.alchemy.com/v2/nRVT_IneMUDF3Pokubawx}
|
||||
REDIS_HOST: ${REDIS_HOST:-vz-redis}
|
||||
POSTGRES_HOST: ${POSTGRES_HOST:-vz-postgres}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-vz_oracle}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-vz_oracle}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-}
|
||||
POLL_INTERVAL: "60"
|
||||
network_mode: host
|
||||
|
||||
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
|
||||
- /home/constellationnode/.korenet/vector-zulu/certificates:/certs:ro
|
||||
- /home/constellationnode/.korenet/vector-zulu/.secrets:/app/.secrets:ro
|
||||
working_dir: /app
|
||||
command: >
|
||||
sh -c "pip install requests redis psycopg2-binary -q && python korechain_poster.py"
|
||||
environment:
|
||||
REDIS_HOST: ${REDIS_HOST:-vz-redis}
|
||||
POSTGRES_HOST: ${POSTGRES_HOST:-vz-postgres}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-vz_oracle}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-vz_oracle}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-}
|
||||
CERT_PATH: /certs/vector-zulu-client.fullchain.pem
|
||||
KEY_PATH: /certs/vector-zulu-client.key
|
||||
MAX_RETRIES: "3"
|
||||
RETRY_DELAY: "30"
|
||||
POLL_INTERVAL: "5"
|
||||
network_mode: host
|
||||
|
||||
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
|
||||
working_dir: /app
|
||||
command: >
|
||||
sh -c "pip install flask redis psycopg2-binary -q && python adapter_api.py"
|
||||
environment:
|
||||
REDIS_HOST: ${REDIS_HOST:-vz-redis}
|
||||
POSTGRES_HOST: ${POSTGRES_HOST:-vz-postgres}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-vz_oracle}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-vz_oracle}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-}
|
||||
network_mode: host
|
||||
Reference in New Issue
Block a user