Skip to content

Instantly share code, notes, and snippets.

@drortirosh
Created May 1, 2020 14:13
Show Gist options
  • Save drortirosh/7ee583b703e63c8b9f4fb8f509d36ca9 to your computer and use it in GitHub Desktop.
Save drortirosh/7ee583b703e63c8b9f4fb8f509d36ca9 to your computer and use it in GitHub Desktop.

Revisions

  1. Dror Tirosh created this gist May 1, 2020.
    4 changes: 4 additions & 0 deletions .env
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    HOST=myhost.com
    NODE_URL=https://mainnet.infura.io/v3/c3422181d0594697a38defe7706a1e5b
    RELAY_HUB=0xD216153c06E857cD7f72665E0aF1d7D82172F494
    GAS_PRICE_PERCENT=70
    32 changes: 32 additions & 0 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    #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}