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:
|
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
|
||||||
|
|
||||||
@ -48,8 +47,8 @@ services:
|
|||||||
|
|
||||||
eth-server:
|
eth-server:
|
||||||
build: .
|
build: .
|
||||||
image: tornadorelayer:mainnet
|
image: tornadocash/relayer:mainnet-v4
|
||||||
profiles: [ 'eth' ]
|
profiles: ["eth"]
|
||||||
restart: always
|
restart: always
|
||||||
command: server
|
command: server
|
||||||
env_file: .env.eth
|
env_file: .env.eth
|
||||||
@ -60,8 +59,8 @@ services:
|
|||||||
depends_on: [redis]
|
depends_on: [redis]
|
||||||
|
|
||||||
eth-treeWatcher:
|
eth-treeWatcher:
|
||||||
image: tornadorelayer:mainnet
|
image: tornadocash/relayer:mainnet-v4
|
||||||
profiles: [ 'eth' ]
|
profiles: ["eth"]
|
||||||
restart: always
|
restart: always
|
||||||
command: treeWatcher
|
command: treeWatcher
|
||||||
env_file: .env.eth
|
env_file: .env.eth
|
||||||
@ -71,8 +70,8 @@ services:
|
|||||||
depends_on: [redis, eth-server]
|
depends_on: [redis, eth-server]
|
||||||
|
|
||||||
eth-priceWatcher:
|
eth-priceWatcher:
|
||||||
image: tornadorelayer:mainnet
|
image: tornadocash/relayer:mainnet-v4
|
||||||
profiles: [ 'eth' ]
|
profiles: ["eth"]
|
||||||
restart: always
|
restart: always
|
||||||
command: priceWatcher
|
command: priceWatcher
|
||||||
env_file: .env.eth
|
env_file: .env.eth
|
||||||
@ -82,8 +81,8 @@ services:
|
|||||||
depends_on: [redis, eth-server]
|
depends_on: [redis, eth-server]
|
||||||
|
|
||||||
eth-healthWatcher:
|
eth-healthWatcher:
|
||||||
image: tornadorelayer:mainnet
|
image: tornadocash/relayer:mainnet-v4
|
||||||
profiles: [ 'eth' ]
|
profiles: ["eth"]
|
||||||
restart: always
|
restart: always
|
||||||
command: healthWatcher
|
command: healthWatcher
|
||||||
env_file: .env.eth
|
env_file: .env.eth
|
||||||
@ -93,8 +92,8 @@ services:
|
|||||||
depends_on: [redis, eth-server]
|
depends_on: [redis, eth-server]
|
||||||
|
|
||||||
eth-worker1:
|
eth-worker1:
|
||||||
image: tornadorelayer:mainnet
|
image: tornadocash/relayer:mainnet-v4
|
||||||
profiles: [ 'eth' ]
|
profiles: ["eth"]
|
||||||
restart: always
|
restart: always
|
||||||
command: worker
|
command: worker
|
||||||
env_file: .env.eth
|
env_file: .env.eth
|
||||||
@ -167,8 +166,8 @@ services:
|
|||||||
# ---------------------- BSC (Binance Smart Chain) ----------------------- #
|
# ---------------------- BSC (Binance Smart Chain) ----------------------- #
|
||||||
|
|
||||||
bsc-server:
|
bsc-server:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'bsc' ]
|
profiles: ["bsc"]
|
||||||
restart: always
|
restart: always
|
||||||
command: server
|
command: server
|
||||||
env_file: .env.bsc
|
env_file: .env.bsc
|
||||||
@ -179,8 +178,8 @@ services:
|
|||||||
depends_on: [redis]
|
depends_on: [redis]
|
||||||
|
|
||||||
bsc-healthWatcher:
|
bsc-healthWatcher:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'bsc' ]
|
profiles: ["bsc"]
|
||||||
restart: always
|
restart: always
|
||||||
command: healthWatcher
|
command: healthWatcher
|
||||||
env_file: .env.bsc
|
env_file: .env.bsc
|
||||||
@ -190,8 +189,8 @@ services:
|
|||||||
depends_on: [redis, bsc-server]
|
depends_on: [redis, bsc-server]
|
||||||
|
|
||||||
bsc-worker1:
|
bsc-worker1:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'bsc' ]
|
profiles: ["bsc"]
|
||||||
restart: always
|
restart: always
|
||||||
command: worker
|
command: worker
|
||||||
env_file: .env.bsc
|
env_file: .env.bsc
|
||||||
@ -205,8 +204,8 @@ services:
|
|||||||
# ---------------------- Polygon (MATIC) --------------------- #
|
# ---------------------- Polygon (MATIC) --------------------- #
|
||||||
|
|
||||||
polygon-server:
|
polygon-server:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'polygon' ]
|
profiles: ["polygon"]
|
||||||
restart: always
|
restart: always
|
||||||
command: server
|
command: server
|
||||||
env_file: .env.polygon
|
env_file: .env.polygon
|
||||||
@ -217,8 +216,8 @@ services:
|
|||||||
depends_on: [redis]
|
depends_on: [redis]
|
||||||
|
|
||||||
polygon-healthWatcher:
|
polygon-healthWatcher:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'polygon' ]
|
profiles: ["polygon"]
|
||||||
restart: always
|
restart: always
|
||||||
command: healthWatcher
|
command: healthWatcher
|
||||||
env_file: .env.polygon
|
env_file: .env.polygon
|
||||||
@ -228,8 +227,8 @@ services:
|
|||||||
depends_on: [redis, polygon-server]
|
depends_on: [redis, polygon-server]
|
||||||
|
|
||||||
polygon-worker1:
|
polygon-worker1:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'polygon' ]
|
profiles: ["polygon"]
|
||||||
restart: always
|
restart: always
|
||||||
command: worker
|
command: worker
|
||||||
env_file: .env.polygon
|
env_file: .env.polygon
|
||||||
@ -243,8 +242,8 @@ services:
|
|||||||
# ---------------------- Gnosis (XDAI) ---------------------- #
|
# ---------------------- Gnosis (XDAI) ---------------------- #
|
||||||
|
|
||||||
gnosis-server:
|
gnosis-server:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'gnosis' ]
|
profiles: ["gnosis"]
|
||||||
restart: always
|
restart: always
|
||||||
command: server
|
command: server
|
||||||
env_file: .env.gnosis
|
env_file: .env.gnosis
|
||||||
@ -255,8 +254,8 @@ services:
|
|||||||
depends_on: [redis]
|
depends_on: [redis]
|
||||||
|
|
||||||
gnosis-healthWatcher:
|
gnosis-healthWatcher:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'gnosis' ]
|
profiles: ["gnosis"]
|
||||||
restart: always
|
restart: always
|
||||||
command: healthWatcher
|
command: healthWatcher
|
||||||
env_file: .env.gnosis
|
env_file: .env.gnosis
|
||||||
@ -266,8 +265,8 @@ services:
|
|||||||
depends_on: [redis, gnosis-server]
|
depends_on: [redis, gnosis-server]
|
||||||
|
|
||||||
gnosis-worker1:
|
gnosis-worker1:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'gnosis' ]
|
profiles: ["gnosis"]
|
||||||
restart: always
|
restart: always
|
||||||
command: worker
|
command: worker
|
||||||
env_file: .env.gnosis
|
env_file: .env.gnosis
|
||||||
@ -281,8 +280,8 @@ services:
|
|||||||
# ---------------------- AVAX ---------------------- #
|
# ---------------------- AVAX ---------------------- #
|
||||||
|
|
||||||
avax-server:
|
avax-server:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'avax' ]
|
profiles: ["avax"]
|
||||||
restart: always
|
restart: always
|
||||||
command: server
|
command: server
|
||||||
env_file: .env.avax
|
env_file: .env.avax
|
||||||
@ -293,8 +292,8 @@ services:
|
|||||||
depends_on: [redis]
|
depends_on: [redis]
|
||||||
|
|
||||||
avax-healthWatcher:
|
avax-healthWatcher:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'avax' ]
|
profiles: ["avax"]
|
||||||
restart: always
|
restart: always
|
||||||
command: healthWatcher
|
command: healthWatcher
|
||||||
env_file: .env.avax
|
env_file: .env.avax
|
||||||
@ -304,8 +303,8 @@ services:
|
|||||||
depends_on: [redis, avax-server]
|
depends_on: [redis, avax-server]
|
||||||
|
|
||||||
avax-worker1:
|
avax-worker1:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'avax' ]
|
profiles: ["avax"]
|
||||||
restart: always
|
restart: always
|
||||||
command: worker
|
command: worker
|
||||||
env_file: .env.avax
|
env_file: .env.avax
|
||||||
@ -319,8 +318,8 @@ services:
|
|||||||
# ---------------------- OP ------------------------ #
|
# ---------------------- OP ------------------------ #
|
||||||
|
|
||||||
op-server:
|
op-server:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'op' ]
|
profiles: ["op"]
|
||||||
restart: always
|
restart: always
|
||||||
command: server
|
command: server
|
||||||
env_file: .env.op
|
env_file: .env.op
|
||||||
@ -331,8 +330,8 @@ services:
|
|||||||
depends_on: [redis]
|
depends_on: [redis]
|
||||||
|
|
||||||
op-healthWatcher:
|
op-healthWatcher:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'op' ]
|
profiles: ["op"]
|
||||||
restart: always
|
restart: always
|
||||||
command: healthWatcher
|
command: healthWatcher
|
||||||
env_file: .env.op
|
env_file: .env.op
|
||||||
@ -342,8 +341,8 @@ services:
|
|||||||
depends_on: [redis, op-server]
|
depends_on: [redis, op-server]
|
||||||
|
|
||||||
op-worker1:
|
op-worker1:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'op' ]
|
profiles: ["op"]
|
||||||
restart: always
|
restart: always
|
||||||
command: worker
|
command: worker
|
||||||
env_file: .env.op
|
env_file: .env.op
|
||||||
@ -357,8 +356,8 @@ services:
|
|||||||
# ---------------------- Arbitrum ----------------------- #
|
# ---------------------- Arbitrum ----------------------- #
|
||||||
|
|
||||||
arb-server:
|
arb-server:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'arb' ]
|
profiles: ["arb"]
|
||||||
restart: always
|
restart: always
|
||||||
command: server
|
command: server
|
||||||
env_file: .env.arb
|
env_file: .env.arb
|
||||||
@ -369,8 +368,8 @@ services:
|
|||||||
depends_on: [redis]
|
depends_on: [redis]
|
||||||
|
|
||||||
arb-healthWatcher:
|
arb-healthWatcher:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'arb' ]
|
profiles: ["arb"]
|
||||||
restart: always
|
restart: always
|
||||||
command: healthWatcher
|
command: healthWatcher
|
||||||
env_file: .env.arb
|
env_file: .env.arb
|
||||||
@ -380,8 +379,8 @@ services:
|
|||||||
depends_on: [redis, arb-server]
|
depends_on: [redis, arb-server]
|
||||||
|
|
||||||
arb-worker1:
|
arb-worker1:
|
||||||
image: tornadorelayer:sidechain
|
image: tornadocash/relayer:sidechain-beta
|
||||||
profiles: [ 'arb' ]
|
profiles: ["arb"]
|
||||||
restart: always
|
restart: always
|
||||||
command: worker
|
command: worker
|
||||||
env_file: .env.arb
|
env_file: .env.arb
|
||||||
@ -396,7 +395,7 @@ services:
|
|||||||
|
|
||||||
goerli-server:
|
goerli-server:
|
||||||
image: tornadorelayer:mainnet
|
image: tornadorelayer:mainnet
|
||||||
profiles: [ 'geth' ]
|
profiles: ["geth"]
|
||||||
restart: always
|
restart: always
|
||||||
command: server
|
command: server
|
||||||
env_file: .env.goerli
|
env_file: .env.goerli
|
||||||
@ -408,7 +407,7 @@ services:
|
|||||||
|
|
||||||
goerli-treeWatcher:
|
goerli-treeWatcher:
|
||||||
image: tornadorelayer:mainnet
|
image: tornadorelayer:mainnet
|
||||||
profiles: [ 'goerli' ]
|
profiles: ["goerli"]
|
||||||
restart: always
|
restart: always
|
||||||
command: treeWatcher
|
command: treeWatcher
|
||||||
env_file: .env.goerli
|
env_file: .env.goerli
|
||||||
@ -419,7 +418,7 @@ services:
|
|||||||
|
|
||||||
goerli-priceWatcher:
|
goerli-priceWatcher:
|
||||||
image: tornadorelayer:mainnet
|
image: tornadorelayer:mainnet
|
||||||
profiles: [ 'goerli' ]
|
profiles: ["goerli"]
|
||||||
restart: always
|
restart: always
|
||||||
command: priceWatcher
|
command: priceWatcher
|
||||||
env_file: .env.goerli
|
env_file: .env.goerli
|
||||||
@ -430,7 +429,7 @@ services:
|
|||||||
|
|
||||||
goerli-healthWatcher:
|
goerli-healthWatcher:
|
||||||
image: tornadorelayer:mainnet
|
image: tornadorelayer:mainnet
|
||||||
profiles: [ 'goerli' ]
|
profiles: ["goerli"]
|
||||||
restart: always
|
restart: always
|
||||||
command: healthWatcher
|
command: healthWatcher
|
||||||
env_file: .env.goerli
|
env_file: .env.goerli
|
||||||
@ -441,7 +440,7 @@ services:
|
|||||||
|
|
||||||
goerli-worker1:
|
goerli-worker1:
|
||||||
image: tornadorelayer:mainnet
|
image: tornadorelayer:mainnet
|
||||||
profiles: [ 'goerli' ]
|
profiles: ["goerli"]
|
||||||
restart: always
|
restart: always
|
||||||
command: worker
|
command: worker
|
||||||
env_file: .env.goerli
|
env_file: .env.goerli
|
||||||
|
17
install.sh
17
install.sh
@ -47,6 +47,14 @@ function install_requred_packages(){
|
|||||||
echo -e "\nAll required packages installed successfully";
|
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(){
|
function install_repositories(){
|
||||||
git clone $relayer_soft_git_repo -b main-v4 $relayer_folder
|
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;
|
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(){
|
function configure_nginx_reverse_proxy(){
|
||||||
systemctl stop apache2;
|
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;
|
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;
|
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 restart nginx;
|
||||||
systemctl stop nginx;
|
systemctl stop nginx;
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_relayer_docker_containers(){
|
function build_relayer_docker_containers(){
|
||||||
docker build -t tornadorelayer:mainnet $relayer_mainnet_soft_source_folder;
|
cd $relayer_mainnet_soft_source_folder && npm run build;
|
||||||
docker build -t tornadorelayer:sidechain $relayer_sidechains_soft_source_folder;
|
cd $relayer_sidechains_soft_source_folder && npm run build;
|
||||||
}
|
}
|
||||||
|
|
||||||
function prepare_environments(){
|
function prepare_environments(){
|
||||||
@ -95,6 +103,7 @@ function prepare_environments(){
|
|||||||
|
|
||||||
function main(){
|
function main(){
|
||||||
install_requred_packages;
|
install_requred_packages;
|
||||||
|
install_node;
|
||||||
install_repositories;
|
install_repositories;
|
||||||
configure_firewall;
|
configure_firewall;
|
||||||
configure_nginx_reverse_proxy;
|
configure_nginx_reverse_proxy;
|
||||||
|
Loading…
Reference in New Issue
Block a user