Skip to content

Instantly share code, notes, and snippets.

@drortirosh
Created May 1, 2020 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drortirosh/7ee583b703e63c8b9f4fb8f509d36ca9 to your computer and use it in GitHub Desktop.
Save drortirosh/7ee583b703e63c8b9f4fb8f509d36ca9 to your computer and use it in GitHub Desktop.
docker-compose for easy startup of GSNv1 relay
HOST=myhost.com
NODE_URL=https://mainnet.infura.io/v3/c3422181d0594697a38defe7706a1e5b
RELAY_HUB=0xD216153c06E857cD7f72665E0aF1d7D82172F494
GAS_PRICE_PERCENT=70
#usage:
#- edit .env file with your host name and infura URL,
#- run: docker-compose up -d
#- curl https://myhost.com/getaddr
#- write down the relay address
#- fund the relay (script from GSNv1: https://github.com/opengsn/gsn/blob/13fa9d029bfa8858519e25ca6f16e717d695bdab/scripts/fundrelay.js)
# - ./scripts/fundrelay.js RELAY_HUB_ADDRESS 'https://example.com' 0 PROVIDER_URL
version: '3'
services:
https-portal:
image: steveltn/https-portal:1
ports:
- '80:80'
- '443:443'
restart: always
environment:
DOMAINS: '${HOST} -> http://gsn1'
STAGE: 'production'
gsn1:
image: dmihal/gsn-relay-xdai
restart: always
volumes:
- ./gsn1-data:/app/data
environment:
URL: https://${HOST}
LOCAL_PORT: 80
NODE_URL: ${NODE_URL}
RELAY_HUB: "${RELAY_HUB}"
GAS_PRICE_PERCENT: ${GAS_PRICE_PERCENT}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment