mirror of
https://github.com/tornadocash/tornado-relayer
synced 2024-02-02 15:04:06 +01:00
add docker readme
This commit is contained in:
parent
c45dabebf2
commit
dd8755658d
@ -1,5 +1,5 @@
|
||||
NET_ID=42
|
||||
RPC_URL=https://kovan.infura.io/v3/a3f4d001c1fc4a359ea70dd27fd9cb51
|
||||
RPC_URL=https://kovan.infura.io
|
||||
PRIVATE_KEY=
|
||||
# 2.5 means 2.5%
|
||||
RELAYER_FEE=2.5
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
||||
.vscode
|
||||
node_modules/
|
||||
.env
|
||||
.env.mainnet
|
||||
.env.kovan
|
18
README.md
18
README.md
@ -14,11 +14,27 @@ Relayer should return a transaction hash.
|
||||
|
||||
*Note.* If you want to change contracts' addresses go to [config.js](./config.js) file.
|
||||
|
||||
## Deploy as a Docker container
|
||||
## Deploy with docker-compose
|
||||
|
||||
docker-compose.yml contains a stack that will automatically provision SSL certificates for your domain name and will add a https redirect to port 80.
|
||||
|
||||
1. Download docker-compose.yml
|
||||
2. Change environment variables for `kovan` containers as appropriate
|
||||
* add `PRIVATE_KEY` for your relayer address
|
||||
* set `VIRTUAL_HOST` and `LETSENCRYPT_HOST` to your domain and add DNS record pointing to your relayer ip address
|
||||
* customize `RELAYER_FEE`
|
||||
* update `RPC_URL` if needed
|
||||
3. Run `docker-compose up -d`
|
||||
|
||||
## Run as a Docker container
|
||||
|
||||
1. `cp .env.example .env`
|
||||
2. Modify `.env` as needed
|
||||
3. `docker run -d --env-file .env -p 80:8000 tornadocash/relayer`
|
||||
|
||||
In that case you will need to add https termination yourself because browsers with default settings will prevent https
|
||||
tornado.cash UI from submitting your request over http connection
|
||||
|
||||
## Input data example
|
||||
```json
|
||||
{
|
||||
|
32
docker-compose.yml
Normal file
32
docker-compose.yml
Normal file
@ -0,0 +1,32 @@
|
||||
version: '2'
|
||||
services:
|
||||
kovan:
|
||||
image: tornadocash/relayer
|
||||
restart: always
|
||||
env_file: ./.env.kovan
|
||||
environment:
|
||||
VIRTUAL_HOST: example.duckdns.org
|
||||
LETSENCRYPT_HOST: example.duckdns.org
|
||||
NET_ID: 42
|
||||
RPC_URL: https://kovan.infura.io
|
||||
PRIVATE_KEY:
|
||||
# 2.5 means 2.5%
|
||||
RELAYER_FEE: 2.5
|
||||
nginx:
|
||||
image: jwilder/nginx-proxy
|
||||
restart: always
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
volumes:
|
||||
- /etc/nginx/certs
|
||||
- /etc/nginx/vhost.d
|
||||
- /usr/share/nginx/html
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
letsencrypt:
|
||||
image: jrcs/letsencrypt-nginx-proxy-companion
|
||||
restart: always
|
||||
volumes_from:
|
||||
- nginx
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
Loading…
Reference in New Issue
Block a user