Edit docker-compose config: change docker images to prebuilt local, change .env files and profiles naming for sidechains

This commit is contained in:
Theo 2023-06-10 19:16:11 +03:00
parent 3b13d3f508
commit 58dae5b030
2 changed files with 122 additions and 184 deletions

@ -5,7 +5,7 @@ services:
redis: redis:
image: redis image: redis
restart: always restart: always
command: [redis-server, --appendonly, 'yes'] command: [ redis-server, --appendonly, 'yes' ]
volumes: volumes:
- redis:/data - redis:/data
@ -44,72 +44,74 @@ services:
- nginx - nginx
- dockergen - dockergen
# ---------------------- ETH ----------------------- # # ---------------------- ETH Mainnet ----------------------- #
eth-server: eth-server:
build: . build: .
image: local/tornadocash/relayer/4.14 image: tornadorelayer:mainnet
profiles: [ 'eth' ] profiles: [ 'eth' ]
restart: always restart: always
command: server command: server
# env_file: .env.eth env_file: .env.eth
environment: environment:
NET_ID: 1 NET_ID: 1
REDIS_URL: redis://redis/0 REDIS_URL: redis://redis/0
nginx_proxy_read_timeout: 600 nginx_proxy_read_timeout: 600
depends_on: [ redis ] depends_on: [ redis ]
# eth-treeWatcher: eth-treeWatcher:
# image: local/tornadocash/relayer/4.14 image: tornadorelayer:mainnet
# profiles: [ 'eth' ] profiles: [ 'eth' ]
# restart: always restart: always
# command: treeWatcher command: treeWatcher
# env_file: .env.eth env_file: .env.eth
# environment: environment:
# NET_ID: 1 NET_ID: 1
# REDIS_URL: redis://redis/0 REDIS_URL: redis://redis/0
# depends_on: [ redis, eth-server ] depends_on: [ redis, eth-server ]
eth-priceWatcher: eth-priceWatcher:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:mainnet
profiles: [ 'eth' ] profiles: [ 'eth' ]
restart: always restart: always
command: priceWatcher command: priceWatcher
# env_file: .env.eth env_file: .env.eth
environment: environment:
NET_ID: 1 NET_ID: 1
REDIS_URL: redis://redis/0 REDIS_URL: redis://redis/0
depends_on: [ redis, eth-server ] depends_on: [ redis, eth-server ]
eth-healthWatcher: eth-healthWatcher:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:mainnet
profiles: [ 'eth' ] profiles: [ 'eth' ]
restart: always restart: always
command: healthWatcher command: healthWatcher
# env_file: .env.eth env_file: .env.eth
environment: environment:
NET_ID: 1 NET_ID: 1
REDIS_URL: redis://redis/0 REDIS_URL: redis://redis/0
depends_on: [ redis, eth-server ] depends_on: [ redis, eth-server ]
eth-worker1: eth-worker1:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:mainnet
profiles: [ 'eth' ] profiles: [ 'eth' ]
restart: always restart: always
command: worker command: worker
# env_file: .env.eth env_file: .env.eth
environment: environment:
NET_ID: 1 NET_ID: 1
REDIS_URL: redis://redis/0 REDIS_URL: redis://redis/0
depends_on: [ redis, eth-server ] depends_on: [ redis, eth-server ]
# worker2: # # This is additional worker for ethereum mainnet
# image: tornadocash/relayer:mining # # So you can process transactions from multiple addresses, but before it you need to set up those addresses as workers
# eth-worker2:
# image: tornadorelayer:mainnet
# profiles: [ 'eth' ]
# restart: always # restart: always
# command: worker # command: worker
# env_file: .env # env_file: .env2.eth
# environment: # environment:
# PRIVATE_KEY: qwe
# REDIS_URL: redis://redis/0 # REDIS_URL: redis://redis/0
# # this container will proxy *.onion domain to the server container # # this container will proxy *.onion domain to the server container
@ -162,199 +164,151 @@ services:
# -------------------------------------------------- # # -------------------------------------------------- #
# ---------------------- BNB ----------------------- # # ---------------------- BSC (Binance Smart Chain) ----------------------- #
bnb-server: bsc-server:
build: . image: tornadorelayer:sidechain
image: local/tornadocash/relayer/4.14 profiles: [ 'bsc' ]
profiles: [ 'bnb' ]
restart: always restart: always
command: server command: server
# env_file: .env.bnb env_file: .env.bsc
environment: environment:
NET_ID: 56 NET_ID: 56
REDIS_URL: redis://redis/1 REDIS_URL: redis://redis/1
nginx_proxy_read_timeout: 600 nginx_proxy_read_timeout: 600
depends_on: [ redis ] depends_on: [ redis ]
bnb-priceWatcher: bsc-healthWatcher:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:sidechain
profiles: [ 'bnb' ] profiles: [ 'bsc' ]
restart: always
command: priceWatcher
# env_file: .env.bnb
environment:
NET_ID: 56
REDIS_URL: redis://redis/1
depends_on: [ redis, bnb-server ]
bnb-healthWatcher:
image: local/tornadocash/relayer/4.14
profiles: [ 'bnb' ]
restart: always restart: always
command: healthWatcher command: healthWatcher
# env_file: .env.bnb env_file: .env.bsc
environment: environment:
NET_ID: 56 NET_ID: 56
REDIS_URL: redis://redis/1 REDIS_URL: redis://redis/1
depends_on: [ redis, bnb-server ] depends_on: [ redis, bsc-server ]
bnb-worker1: bsc-worker1:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:sidechain
profiles: [ 'bnb' ] profiles: [ 'bsc' ]
restart: always restart: always
command: worker command: worker
# env_file: .env.bnb env_file: .env.bsc
environment: environment:
NET_ID: 56 NET_ID: 56
REDIS_URL: redis://redis/1 REDIS_URL: redis://redis/1
depends_on: [ redis, bnb-server ] depends_on: [ redis, bsc-server ]
# -------------------------------------------------- # # -------------------------------------------------- #
# ---------------------- MATIC --------------------- # # ---------------------- Polygon (MATIC) --------------------- #
matic-server: polygon-server:
build: . image: tornadorelayer:sidechain
image: local/tornadocash/relayer/4.14 profiles: [ 'polygon' ]
profiles: [ 'matic' ]
restart: always restart: always
command: server command: server
# env_file: .env.matic env_file: .env.polygon
environment: environment:
NET_ID: 137 NET_ID: 137
REDIS_URL: redis://redis/2 REDIS_URL: redis://redis/2
nginx_proxy_read_timeout: 600 nginx_proxy_read_timeout: 600
depends_on: [ redis ] depends_on: [ redis ]
matic-priceWatcher: polygon-healthWatcher:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:sidechain
profiles: [ 'matic' ] profiles: [ 'polygon' ]
restart: always
command: priceWatcher
# env_file: .env.matic
environment:
NET_ID: 137
REDIS_URL: redis://redis/2
depends_on: [ redis, matic-server ]
matic-healthWatcher:
image: local/tornadocash/relayer/4.14
profiles: [ 'matic' ]
restart: always restart: always
command: healthWatcher command: healthWatcher
# env_file: .env.matic env_file: .env.polygon
environment: environment:
NET_ID: 137 NET_ID: 137
REDIS_URL: redis://redis/2 REDIS_URL: redis://redis/2
depends_on: [ redis, matic-server ] depends_on: [ redis, polygon-server ]
matic-worker1: polygon-worker1:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:sidechain
profiles: [ 'matic' ] profiles: [ 'polygon' ]
restart: always restart: always
command: worker command: worker
# env_file: .env.matic env_file: .env.polygon
environment: environment:
NET_ID: 137 NET_ID: 137
REDIS_URL: redis://redis/2 REDIS_URL: redis://redis/2
depends_on: [ redis, matic-server ] depends_on: [ redis, polygon-server ]
# -------------------------------------------------- # # -------------------------------------------------- #
# ---------------------- XDAI ---------------------- # # ---------------------- Gnosis (XDAI) ---------------------- #
xdai-server: gnosis-server:
build: . image: tornadorelayer:sidechain
image: local/tornadocash/relayer/4.14 profiles: [ 'gnosis' ]
profiles: [ 'xdai' ]
restart: always restart: always
command: server command: server
# env_file: .env.xdai env_file: .env.gnosis
environment: environment:
NET_ID: 100 NET_ID: 100
REDIS_URL: redis://redis/3 REDIS_URL: redis://redis/3
nginx_proxy_read_timeout: 600 nginx_proxy_read_timeout: 600
depends_on: [ redis ] depends_on: [ redis ]
xdai-priceWatcher: gnosis-healthWatcher:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:sidechain
profiles: [ 'xdai' ] profiles: [ 'gnosis' ]
restart: always
command: priceWatcher
# env_file: .env.xdai
environment:
NET_ID: 100
REDIS_URL: redis://redis/3
depends_on: [ redis, xdai-server ]
xdai-healthWatcher:
image: local/tornadocash/relayer/4.14
profiles: [ 'xdai' ]
restart: always restart: always
command: healthWatcher command: healthWatcher
# env_file: .env.xdai env_file: .env.gnosis
environment: environment:
NET_ID: 100 NET_ID: 100
REDIS_URL: redis://redis/3 REDIS_URL: redis://redis/3
depends_on: [ redis, xdai-server ] depends_on: [ redis, gnosis-server ]
xdai-worker1: gnosis-worker1:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:sidechain
profiles: [ 'xdai' ] profiles: [ 'gnosis' ]
restart: always restart: always
command: worker command: worker
# env_file: .env.xdai env_file: .env.gnosis
environment: environment:
NET_ID: 100 NET_ID: 100
REDIS_URL: redis://redis/3 REDIS_URL: redis://redis/3
depends_on: [ redis, xdai-server ] depends_on: [ redis, gnosis-server ]
# -------------------------------------------------- # # -------------------------------------------------- #
# ---------------------- AVAX ---------------------- # # ---------------------- AVAX ---------------------- #
avax-server: avax-server:
build: . image: tornadorelayer:sidechain
image: local/tornadocash/relayer/4.14
profiles: [ 'avax' ] profiles: [ 'avax' ]
restart: always restart: always
command: server command: server
# env_file: .env.avax env_file: .env.avax
environment: environment:
NET_ID: 43114 NET_ID: 43114
REDIS_URL: redis://redis/4 REDIS_URL: redis://redis/4
nginx_proxy_read_timeout: 600 nginx_proxy_read_timeout: 600
depends_on: [ redis ] depends_on: [ redis ]
avax-priceWatcher:
image: local/tornadocash/relayer/4.14
profiles: [ 'avax' ]
restart: always
command: priceWatcher
# env_file: .env.avax
environment:
NET_ID: 43114
REDIS_URL: redis://redis/4
depends_on: [ redis, avax-server ]
avax-healthWatcher: avax-healthWatcher:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:sidechain
profiles: [ 'avax' ] profiles: [ 'avax' ]
restart: always restart: always
command: healthWatcher command: healthWatcher
# env_file: .env.avax env_file: .env.avax
environment: environment:
NET_ID: 43114 NET_ID: 43114
REDIS_URL: redis://redis/4 REDIS_URL: redis://redis/4
depends_on: [ redis, avax-server ] depends_on: [ redis, avax-server ]
avax-worker1: avax-worker1:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:sidechain
profiles: [ 'avax' ] profiles: [ 'avax' ]
restart: always restart: always
command: worker command: worker
# env_file: .env.avax env_file: .env.avax
environment: environment:
NET_ID: 43114 NET_ID: 43114
REDIS_URL: redis://redis/4 REDIS_URL: redis://redis/4
@ -365,49 +319,34 @@ services:
# ---------------------- OP ------------------------ # # ---------------------- OP ------------------------ #
op-server: op-server:
build: . image: tornadorelayer:sidechain
image: local/tornadocash/relayer/4.14
profiles: [ 'op' ] profiles: [ 'op' ]
restart: always restart: always
command: server command: server
# env_file: .env.op env_file: .env.op
environment: environment:
NET_ID: 10 NET_ID: 10
REDIS_URL: redis://redis/5 REDIS_URL: redis://redis/5
nginx_proxy_read_timeout: 600 nginx_proxy_read_timeout: 600
depends_on: [ redis ] depends_on: [ redis ]
op-priceWatcher:
image: local/tornadocash/relayer/4.14
profiles: [ 'op' ]
image: tornadocash/relayer:mining
restart: always
command: priceWatcher
# env_file: .env.op
environment:
NET_ID: 10
REDIS_URL: redis://redis/5
depends_on: [ redis, op-server ]
op-healthWatcher: op-healthWatcher:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:sidechain
profiles: [ 'op' ] profiles: [ 'op' ]
image: tornadocash/relayer:mining
restart: always restart: always
command: healthWatcher command: healthWatcher
# env_file: .env.op env_file: .env.op
environment: environment:
NET_ID: 10 NET_ID: 10
REDIS_URL: redis://redis/5 REDIS_URL: redis://redis/5
depends_on: [ redis, op-server ] depends_on: [ redis, op-server ]
op-worker1: op-worker1:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:sidechain
profiles: [ 'op' ] profiles: [ 'op' ]
image: tornadocash/relayer:mining
restart: always restart: always
command: worker command: worker
# env_file: .env.op env_file: .env.op
environment: environment:
NET_ID: 10 NET_ID: 10
REDIS_URL: redis://redis/5 REDIS_URL: redis://redis/5
@ -415,49 +354,37 @@ services:
# -------------------------------------------------- # # -------------------------------------------------- #
# ---------------------- ARB ----------------------- # # ---------------------- Arbitrum ----------------------- #
arb-server: arb-server:
build: . image: tornadorelayer:sidechain
image: local/tornadocash/relayer/4.14
profiles: [ 'arb' ] profiles: [ 'arb' ]
restart: always restart: always
command: server command: server
# env_file: .env.arb env_file: .env.arb
environment: environment:
NET_ID: 42161 NET_ID: 42161
REDIS_URL: redis://redis/6 REDIS_URL: redis://redis/6
nginx_proxy_read_timeout: 600 nginx_proxy_read_timeout: 600
depends_on: [ redis ] depends_on: [ redis ]
arb-priceWatcher:
image: local/tornadocash/relayer/4.14
profiles: [ 'arb' ]
restart: always
command: priceWatcher
# env_file: .env.arb
environment:
NET_ID: 42161
REDIS_URL: redis://redis/6
depends_on: [ redis, arb-server ]
arb-healthWatcher: arb-healthWatcher:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:sidechain
profiles: [ 'arb' ] profiles: [ 'arb' ]
restart: always restart: always
command: healthWatcher command: healthWatcher
# env_file: .env.arb env_file: .env.arb
environment: environment:
NET_ID: 42161 NET_ID: 42161
REDIS_URL: redis://redis/6 REDIS_URL: redis://redis/6
depends_on: [ redis, arb-server ] depends_on: [ redis, arb-server ]
arb-worker1: arb-worker1:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:sidechain
profiles: [ 'arb' ] profiles: [ 'arb' ]
restart: always restart: always
command: worker command: worker
# env_file: .env.arb env_file: .env.arb
environment: environment:
NET_ID: 42161 NET_ID: 42161
REDIS_URL: redis://redis/6 REDIS_URL: redis://redis/6
@ -465,54 +392,63 @@ services:
# -------------------------------------------------- # # -------------------------------------------------- #
# ---------------------- GETH ---------------------- # # ---------------------- Goerli (Ethereum Testnet) ---------------------- #
geth-server: goerli-server:
build: . image: tornadorelayer:mainnet
image: local/tornadocash/relayer/4.14
profiles: [ 'geth' ] profiles: [ 'geth' ]
restart: always restart: always
command: server command: server
# env_file: .env.geth env_file: .env.goerli
environment: environment:
NET_ID: 5 NET_ID: 5
REDIS_URL: redis://redis/7 REDIS_URL: redis://redis/7
nginx_proxy_read_timeout: 600 nginx_proxy_read_timeout: 600
depends_on: [ redis ] depends_on: [ redis ]
geth-priceWatcher: goerli-treeWatcher:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:mainnet
profiles: [ 'geth' ] profiles: [ 'goerli' ]
restart: always
command: treeWatcher
env_file: .env.goerli
environment:
NET_ID: 5
REDIS_URL: redis://redis/7
depends_on: [ redis, goerli-server ]
goerli-priceWatcher:
image: tornadorelayer:mainnet
profiles: [ 'goerli' ]
restart: always restart: always
command: priceWatcher command: priceWatcher
# env_file: .env.geth env_file: .env.goerli
environment: environment:
NET_ID: 5 NET_ID: 5
REDIS_URL: redis://redis/7 REDIS_URL: redis://redis/7
depends_on: [ redis, geth-server ] depends_on: [ redis, goerli-server ]
geth-healthWatcher: goerli-healthWatcher:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:mainnet
profiles: [ 'geth' ] profiles: [ 'goerli' ]
restart: always restart: always
command: healthWatcher command: healthWatcher
# env_file: .env.geth env_file: .env.goerli
environment: environment:
NET_ID: 5 NET_ID: 5
REDIS_URL: redis://redis/7 REDIS_URL: redis://redis/7
depends_on: [ redis, geth-server ] depends_on: [ redis, goerli-server ]
geth-worker1: goerli-worker1:
image: local/tornadocash/relayer/4.14 image: tornadorelayer:mainnet
profiles: [ 'geth' ] profiles: [ 'goerli' ]
restart: always restart: always
command: worker command: worker
# env_file: .env.geth env_file: .env.goerli
environment: environment:
NET_ID: 5 NET_ID: 5
REDIS_URL: redis://redis/7 REDIS_URL: redis://redis/7
depends_on: [ redis, geth-server ] depends_on: [ redis, goerli-server ]
# -------------------------------------------------- # # -------------------------------------------------- #
volumes: volumes:

@ -92,6 +92,7 @@ function prepare_environments(){
cp $relayer_mainnet_soft_source_folder/.env.mainnet.example $relayer_folder/.env.mainnet; cp $relayer_mainnet_soft_source_folder/.env.mainnet.example $relayer_folder/.env.mainnet;
tee $relayer_folder/.env.bsc $relayer_folder/.env.arb $relayer_folder/.env.goerli $relayer_folder/.env.polygon $relayer_folder/.env.op \ tee $relayer_folder/.env.bsc $relayer_folder/.env.arb $relayer_folder/.env.goerli $relayer_folder/.env.polygon $relayer_folder/.env.op \
$relayer_folder/.env.avax $relayer_folder/.env.gnosis < $relayer_sidechains_soft_source_folder/.env.example > /dev/null; $relayer_folder/.env.avax $relayer_folder/.env.gnosis < $relayer_sidechains_soft_source_folder/.env.example > /dev/null;
cp $relayer_mainnet_soft_source_folder/docker-compose.yml $relayer_folder/docker-compose.yml;
} }
function main(){ function main(){
@ -102,6 +103,7 @@ function main(){
install_docker_utilities; install_docker_utilities;
build_relayer_docker_containers; build_relayer_docker_containers;
prepare_environments; prepare_environments;
cd $relayer_folder;
} }
main; main;