Add build command to create docker image for mainnet relayer locally from source

This commit is contained in:
Theo 2023-07-12 12:56:11 -07:00
parent d1582f1d35
commit 01897a60e3
4 changed files with 11 additions and 72 deletions

View File

@ -43,8 +43,10 @@ __DEPLOYMENT__
- Set `ORACLE_RPC_URL` to an Ethereum native RPC endpoint
4. Uncomment the `env_file` lines (remove `# `) for the associated network services in `docker-compose.yml`
5. Build and deploy the docker source by specifying the network through `--profile <NETWORK_SYMBOL>`
- `docker-compose --profile eth up -d`
5. Build and deploy the docker source by specifying the network through:
- `npm run build`
- `docker-compose up -d`
5. Visit your domain address and check the `/status` endpoint and ensure there is no errors in the `status` field
__NGINX REVERSE PROXY__

View File

@ -1,64 +0,0 @@
version: '2'
# ssh-agent && ssh-add -K ~/.ssh/id_rsa
# DOCKER_BUILDKIT=1 docker build --ssh default -t tornadocash/relayer .
services:
server:
image: tornadocash/relayer
restart: always
command: server
env_file: .env
ports:
- 8000:8000
environment:
REDIS_URL: redis://redis/0
nginx_proxy_read_timeout: 600
depends_on: [redis]
treeWatcher:
image: tornadocash/relayer
restart: always
command: treeWatcher
env_file: .env
environment:
REDIS_URL: redis://redis/0
depends_on: [redis]
priceWatcher:
image: tornadocash/relayer
restart: always
command: priceWatcher
env_file: .env
environment:
REDIS_URL: redis://redis/0
depends_on: [redis]
worker1:
image: tornadocash/relayer
restart: always
command: worker
env_file: .env
environment:
REDIS_URL: redis://redis/0
depends_on: [redis]
# worker2:
# image: tornadocash/relayer
# restart: always
# command: worker
# env_file: .env
# environment:
# PRIVATE_KEY: qwe
# REDIS_URL: redis://redis/0
redis:
image: redis
restart: always
ports:
- '6379:6379'
command: [redis-server, --appendonly, 'yes']
volumes:
- redis:/data
volumes:
redis:

View File

@ -47,7 +47,7 @@ services:
eth-server:
build: .
image: tornadocash/relayer:mainnet
image: tornadocash/relayer:mainnet-v4
restart: always
command: server
env_file: .env
@ -58,7 +58,7 @@ services:
depends_on: [redis]
eth-treeWatcher:
image: tornadocash/relayer:mainnet
image: tornadocash/relayer:mainnet-v4
restart: always
command: treeWatcher
env_file: .env
@ -68,7 +68,7 @@ services:
depends_on: [redis, eth-server]
eth-priceWatcher:
image: tornadocash/relayer:mainnet
image: tornadocash/relayer:mainnet-v4
restart: always
command: priceWatcher
env_file: .env
@ -78,7 +78,7 @@ services:
depends_on: [redis, eth-server]
eth-healthWatcher:
image: tornadocash/relayer:mainnet
image: tornadocash/relayer:mainnet-v4
restart: always
command: healthWatcher
env_file: .env
@ -88,7 +88,7 @@ services:
depends_on: [redis, eth-server]
eth-worker1:
image: tornadocash/relayer:mainnet
image: tornadocash/relayer:mainnet-v4
restart: always
command: worker
env_file: .env
@ -98,7 +98,7 @@ services:
depends_on: [redis, eth-server]
# worker2:
# image: tornadocash/relayer:mining
# image: tornadocash/relayer:mainnet-v4
# restart: always
# command: worker
# env_file: .env

View File

@ -13,6 +13,7 @@
"prettier:fix": "npx prettier --write . --config .prettierrc",
"lint": "yarn eslint && yarn prettier:check",
"test": "mocha",
"build": "docker build -t tornadocash/relayer:mainnet-v4 .",
"start": "docker-compose up -d redis && concurrently \"yarn server\" \"yarn priceWatcher\" \"yarn treeWatcher\" \"yarn worker\" \"yarn healthWatcher\""
},
"author": "tornado.cash",