Change docker images tags & build images in source folders
This commit is contained in:
parent
3b6289bf2c
commit
d709b49204
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
node_modules
|
||||
|
||||
.env
|
||||
.env*
|
@ -1,11 +1,10 @@
|
||||
version: '2'
|
||||
version: "2"
|
||||
|
||||
services:
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
restart: always
|
||||
command: [ redis-server, --appendonly, 'yes' ]
|
||||
command: [redis-server, --appendonly, "yes"]
|
||||
volumes:
|
||||
- redis:/data
|
||||
|
||||
@ -48,8 +47,8 @@ services:
|
||||
|
||||
eth-server:
|
||||
build: .
|
||||
image: tornadorelayer:mainnet
|
||||
profiles: [ 'eth' ]
|
||||
image: tornadocash/relayer:mainnet-v4
|
||||
profiles: ["eth"]
|
||||
restart: always
|
||||
command: server
|
||||
env_file: .env.eth
|
||||
@ -57,51 +56,51 @@ services:
|
||||
NET_ID: 1
|
||||
REDIS_URL: redis://redis/0
|
||||
nginx_proxy_read_timeout: 600
|
||||
depends_on: [ redis ]
|
||||
depends_on: [redis]
|
||||
|
||||
eth-treeWatcher:
|
||||
image: tornadorelayer:mainnet
|
||||
profiles: [ 'eth' ]
|
||||
image: tornadocash/relayer:mainnet-v4
|
||||
profiles: ["eth"]
|
||||
restart: always
|
||||
command: treeWatcher
|
||||
env_file: .env.eth
|
||||
environment:
|
||||
NET_ID: 1
|
||||
REDIS_URL: redis://redis/0
|
||||
depends_on: [ redis, eth-server ]
|
||||
depends_on: [redis, eth-server]
|
||||
|
||||
eth-priceWatcher:
|
||||
image: tornadorelayer:mainnet
|
||||
profiles: [ 'eth' ]
|
||||
image: tornadocash/relayer:mainnet-v4
|
||||
profiles: ["eth"]
|
||||
restart: always
|
||||
command: priceWatcher
|
||||
env_file: .env.eth
|
||||
environment:
|
||||
NET_ID: 1
|
||||
REDIS_URL: redis://redis/0
|
||||
depends_on: [ redis, eth-server ]
|
||||
depends_on: [redis, eth-server]
|
||||
|
||||
eth-healthWatcher:
|
||||
image: tornadorelayer:mainnet
|
||||
profiles: [ 'eth' ]
|
||||
image: tornadocash/relayer:mainnet-v4
|
||||
profiles: ["eth"]
|
||||
restart: always
|
||||
command: healthWatcher
|
||||
env_file: .env.eth
|
||||
environment:
|
||||
NET_ID: 1
|
||||
REDIS_URL: redis://redis/0
|
||||
depends_on: [ redis, eth-server ]
|
||||
depends_on: [redis, eth-server]
|
||||
|
||||
eth-worker1:
|
||||
image: tornadorelayer:mainnet
|
||||
profiles: [ 'eth' ]
|
||||
image: tornadocash/relayer:mainnet-v4
|
||||
profiles: ["eth"]
|
||||
restart: always
|
||||
command: worker
|
||||
env_file: .env.eth
|
||||
environment:
|
||||
NET_ID: 1
|
||||
REDIS_URL: redis://redis/0
|
||||
depends_on: [ redis, eth-server ]
|
||||
depends_on: [redis, eth-server]
|
||||
|
||||
# # This is additional worker for ethereum mainnet
|
||||
# # So you can process transactions from multiple addresses, but before it you need to set up those addresses as workers
|
||||
@ -167,8 +166,8 @@ services:
|
||||
# ---------------------- BSC (Binance Smart Chain) ----------------------- #
|
||||
|
||||
bsc-server:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'bsc' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["bsc"]
|
||||
restart: always
|
||||
command: server
|
||||
env_file: .env.bsc
|
||||
@ -176,37 +175,37 @@ services:
|
||||
NET_ID: 56
|
||||
REDIS_URL: redis://redis/1
|
||||
nginx_proxy_read_timeout: 600
|
||||
depends_on: [ redis ]
|
||||
depends_on: [redis]
|
||||
|
||||
bsc-healthWatcher:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'bsc' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["bsc"]
|
||||
restart: always
|
||||
command: healthWatcher
|
||||
env_file: .env.bsc
|
||||
environment:
|
||||
NET_ID: 56
|
||||
REDIS_URL: redis://redis/1
|
||||
depends_on: [ redis, bsc-server ]
|
||||
depends_on: [redis, bsc-server]
|
||||
|
||||
bsc-worker1:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'bsc' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["bsc"]
|
||||
restart: always
|
||||
command: worker
|
||||
env_file: .env.bsc
|
||||
environment:
|
||||
NET_ID: 56
|
||||
REDIS_URL: redis://redis/1
|
||||
depends_on: [ redis, bsc-server ]
|
||||
depends_on: [redis, bsc-server]
|
||||
|
||||
# -------------------------------------------------- #
|
||||
|
||||
# ---------------------- Polygon (MATIC) --------------------- #
|
||||
|
||||
polygon-server:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'polygon' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["polygon"]
|
||||
restart: always
|
||||
command: server
|
||||
env_file: .env.polygon
|
||||
@ -214,37 +213,37 @@ services:
|
||||
NET_ID: 137
|
||||
REDIS_URL: redis://redis/2
|
||||
nginx_proxy_read_timeout: 600
|
||||
depends_on: [ redis ]
|
||||
depends_on: [redis]
|
||||
|
||||
polygon-healthWatcher:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'polygon' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["polygon"]
|
||||
restart: always
|
||||
command: healthWatcher
|
||||
env_file: .env.polygon
|
||||
environment:
|
||||
NET_ID: 137
|
||||
REDIS_URL: redis://redis/2
|
||||
depends_on: [ redis, polygon-server ]
|
||||
depends_on: [redis, polygon-server]
|
||||
|
||||
polygon-worker1:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'polygon' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["polygon"]
|
||||
restart: always
|
||||
command: worker
|
||||
env_file: .env.polygon
|
||||
environment:
|
||||
NET_ID: 137
|
||||
REDIS_URL: redis://redis/2
|
||||
depends_on: [ redis, polygon-server ]
|
||||
depends_on: [redis, polygon-server]
|
||||
|
||||
# -------------------------------------------------- #
|
||||
|
||||
# ---------------------- Gnosis (XDAI) ---------------------- #
|
||||
|
||||
gnosis-server:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'gnosis' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["gnosis"]
|
||||
restart: always
|
||||
command: server
|
||||
env_file: .env.gnosis
|
||||
@ -252,37 +251,37 @@ services:
|
||||
NET_ID: 100
|
||||
REDIS_URL: redis://redis/3
|
||||
nginx_proxy_read_timeout: 600
|
||||
depends_on: [ redis ]
|
||||
depends_on: [redis]
|
||||
|
||||
gnosis-healthWatcher:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'gnosis' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["gnosis"]
|
||||
restart: always
|
||||
command: healthWatcher
|
||||
env_file: .env.gnosis
|
||||
environment:
|
||||
NET_ID: 100
|
||||
REDIS_URL: redis://redis/3
|
||||
depends_on: [ redis, gnosis-server ]
|
||||
depends_on: [redis, gnosis-server]
|
||||
|
||||
gnosis-worker1:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'gnosis' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["gnosis"]
|
||||
restart: always
|
||||
command: worker
|
||||
env_file: .env.gnosis
|
||||
environment:
|
||||
NET_ID: 100
|
||||
REDIS_URL: redis://redis/3
|
||||
depends_on: [ redis, gnosis-server ]
|
||||
depends_on: [redis, gnosis-server]
|
||||
|
||||
# -------------------------------------------------- #
|
||||
|
||||
# ---------------------- AVAX ---------------------- #
|
||||
|
||||
avax-server:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'avax' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["avax"]
|
||||
restart: always
|
||||
command: server
|
||||
env_file: .env.avax
|
||||
@ -290,37 +289,37 @@ services:
|
||||
NET_ID: 43114
|
||||
REDIS_URL: redis://redis/4
|
||||
nginx_proxy_read_timeout: 600
|
||||
depends_on: [ redis ]
|
||||
depends_on: [redis]
|
||||
|
||||
avax-healthWatcher:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'avax' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["avax"]
|
||||
restart: always
|
||||
command: healthWatcher
|
||||
env_file: .env.avax
|
||||
environment:
|
||||
NET_ID: 43114
|
||||
REDIS_URL: redis://redis/4
|
||||
depends_on: [ redis, avax-server ]
|
||||
depends_on: [redis, avax-server]
|
||||
|
||||
avax-worker1:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'avax' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["avax"]
|
||||
restart: always
|
||||
command: worker
|
||||
env_file: .env.avax
|
||||
environment:
|
||||
NET_ID: 43114
|
||||
REDIS_URL: redis://redis/4
|
||||
depends_on: [ redis, avax-server ]
|
||||
depends_on: [redis, avax-server]
|
||||
|
||||
# -------------------------------------------------- #
|
||||
|
||||
# ---------------------- OP ------------------------ #
|
||||
|
||||
op-server:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'op' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["op"]
|
||||
restart: always
|
||||
command: server
|
||||
env_file: .env.op
|
||||
@ -328,37 +327,37 @@ services:
|
||||
NET_ID: 10
|
||||
REDIS_URL: redis://redis/5
|
||||
nginx_proxy_read_timeout: 600
|
||||
depends_on: [ redis ]
|
||||
depends_on: [redis]
|
||||
|
||||
op-healthWatcher:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'op' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["op"]
|
||||
restart: always
|
||||
command: healthWatcher
|
||||
env_file: .env.op
|
||||
environment:
|
||||
NET_ID: 10
|
||||
REDIS_URL: redis://redis/5
|
||||
depends_on: [ redis, op-server ]
|
||||
depends_on: [redis, op-server]
|
||||
|
||||
op-worker1:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'op' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["op"]
|
||||
restart: always
|
||||
command: worker
|
||||
env_file: .env.op
|
||||
environment:
|
||||
NET_ID: 10
|
||||
REDIS_URL: redis://redis/5
|
||||
depends_on: [ redis, op-server ]
|
||||
depends_on: [redis, op-server]
|
||||
|
||||
# -------------------------------------------------- #
|
||||
|
||||
# ---------------------- Arbitrum ----------------------- #
|
||||
|
||||
arb-server:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'arb' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["arb"]
|
||||
restart: always
|
||||
command: server
|
||||
env_file: .env.arb
|
||||
@ -366,29 +365,29 @@ services:
|
||||
NET_ID: 42161
|
||||
REDIS_URL: redis://redis/6
|
||||
nginx_proxy_read_timeout: 600
|
||||
depends_on: [ redis ]
|
||||
depends_on: [redis]
|
||||
|
||||
arb-healthWatcher:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'arb' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["arb"]
|
||||
restart: always
|
||||
command: healthWatcher
|
||||
env_file: .env.arb
|
||||
environment:
|
||||
NET_ID: 42161
|
||||
REDIS_URL: redis://redis/6
|
||||
depends_on: [ redis, arb-server ]
|
||||
depends_on: [redis, arb-server]
|
||||
|
||||
arb-worker1:
|
||||
image: tornadorelayer:sidechain
|
||||
profiles: [ 'arb' ]
|
||||
image: tornadocash/relayer:sidechain-beta
|
||||
profiles: ["arb"]
|
||||
restart: always
|
||||
command: worker
|
||||
env_file: .env.arb
|
||||
environment:
|
||||
NET_ID: 42161
|
||||
REDIS_URL: redis://redis/6
|
||||
depends_on: [ redis, arb-server ]
|
||||
depends_on: [redis, arb-server]
|
||||
|
||||
# -------------------------------------------------- #
|
||||
|
||||
@ -396,7 +395,7 @@ services:
|
||||
|
||||
goerli-server:
|
||||
image: tornadorelayer:mainnet
|
||||
profiles: [ 'geth' ]
|
||||
profiles: ["geth"]
|
||||
restart: always
|
||||
command: server
|
||||
env_file: .env.goerli
|
||||
@ -404,51 +403,51 @@ services:
|
||||
NET_ID: 5
|
||||
REDIS_URL: redis://redis/7
|
||||
nginx_proxy_read_timeout: 600
|
||||
depends_on: [ redis ]
|
||||
depends_on: [redis]
|
||||
|
||||
goerli-treeWatcher:
|
||||
image: tornadorelayer:mainnet
|
||||
profiles: [ 'goerli' ]
|
||||
profiles: ["goerli"]
|
||||
restart: always
|
||||
command: treeWatcher
|
||||
env_file: .env.goerli
|
||||
environment:
|
||||
NET_ID: 5
|
||||
REDIS_URL: redis://redis/7
|
||||
depends_on: [ redis, goerli-server ]
|
||||
depends_on: [redis, goerli-server]
|
||||
|
||||
goerli-priceWatcher:
|
||||
image: tornadorelayer:mainnet
|
||||
profiles: [ 'goerli' ]
|
||||
profiles: ["goerli"]
|
||||
restart: always
|
||||
command: priceWatcher
|
||||
env_file: .env.goerli
|
||||
environment:
|
||||
NET_ID: 5
|
||||
REDIS_URL: redis://redis/7
|
||||
depends_on: [ redis, goerli-server ]
|
||||
depends_on: [redis, goerli-server]
|
||||
|
||||
goerli-healthWatcher:
|
||||
image: tornadorelayer:mainnet
|
||||
profiles: [ 'goerli' ]
|
||||
profiles: ["goerli"]
|
||||
restart: always
|
||||
command: healthWatcher
|
||||
env_file: .env.goerli
|
||||
environment:
|
||||
NET_ID: 5
|
||||
REDIS_URL: redis://redis/7
|
||||
depends_on: [ redis, goerli-server ]
|
||||
depends_on: [redis, goerli-server]
|
||||
|
||||
goerli-worker1:
|
||||
image: tornadorelayer:mainnet
|
||||
profiles: [ 'goerli' ]
|
||||
profiles: ["goerli"]
|
||||
restart: always
|
||||
command: worker
|
||||
env_file: .env.goerli
|
||||
environment:
|
||||
NET_ID: 5
|
||||
REDIS_URL: redis://redis/7
|
||||
depends_on: [ redis, goerli-server ]
|
||||
depends_on: [redis, goerli-server]
|
||||
# -------------------------------------------------- #
|
||||
|
||||
volumes:
|
||||
|
17
install.sh
17
install.sh
@ -47,6 +47,14 @@ function install_requred_packages(){
|
||||
echo -e "\nAll required packages installed successfully";
|
||||
}
|
||||
|
||||
function install_node(){
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash;
|
||||
. ~/.nvm/nvm.sh;
|
||||
. ~/.profile;
|
||||
. ~/.bashrc;
|
||||
nvm install 14.21.3;
|
||||
}
|
||||
|
||||
function install_repositories(){
|
||||
git clone $relayer_soft_git_repo -b main-v4 $relayer_folder
|
||||
git clone $relayer_soft_git_repo -b mainnet-v4 $relayer_mainnet_soft_source_folder;
|
||||
@ -73,18 +81,18 @@ function configure_firewall(){
|
||||
function configure_nginx_reverse_proxy(){
|
||||
systemctl stop apache2;
|
||||
|
||||
cp $relayer_mainnet_soft_source_folder/tornado.conf /etc/nginx/sites-available/default;
|
||||
cp $relayer_folder/tornado.conf /etc/nginx/sites-available/default;
|
||||
echo "stream { map_hash_bucket_size 128; map_hash_max_size 128; include /etc/nginx/conf.d/streams/*.conf; }" >> /etc/nginx/nginx.conf;
|
||||
mkdir /etc/nginx/conf.d/streams;
|
||||
cp $relayer_mainnet_soft_source_folder/tornado-stream.conf /etc/nginx/conf.d/streams/tornado-stream.conf;
|
||||
cp $relayer_folder/tornado-stream.conf /etc/nginx/conf.d/streams/tornado-stream.conf;
|
||||
|
||||
systemctl restart nginx;
|
||||
systemctl stop nginx;
|
||||
}
|
||||
|
||||
function build_relayer_docker_containers(){
|
||||
docker build -t tornadorelayer:mainnet $relayer_mainnet_soft_source_folder;
|
||||
docker build -t tornadorelayer:sidechain $relayer_sidechains_soft_source_folder;
|
||||
cd $relayer_mainnet_soft_source_folder && npm run build;
|
||||
cd $relayer_sidechains_soft_source_folder && npm run build;
|
||||
}
|
||||
|
||||
function prepare_environments(){
|
||||
@ -95,6 +103,7 @@ function prepare_environments(){
|
||||
|
||||
function main(){
|
||||
install_requred_packages;
|
||||
install_node;
|
||||
install_repositories;
|
||||
configure_firewall;
|
||||
configure_nginx_reverse_proxy;
|
||||
|
Loading…
Reference in New Issue
Block a user