diff --git a/drpc.yml b/drpc.yml index 6ef26d69..9191d665 100644 --- a/drpc.yml +++ b/drpc.yml @@ -6,6 +6,8 @@ services: restart: unless-stopped volumes: - ./main_configs:/etc/dshackle + expose: + - 8080 ports: # - "8080:8080" # - "8081:8081" diff --git a/proxy.yml b/proxy.yml new file mode 100644 index 00000000..96c9c0fa --- /dev/null +++ b/proxy.yml @@ -0,0 +1,45 @@ +version: "3.1" + +services: + proxy: + image: stakesquid/eth-proxy:latest + restart: always + expose: + - "8545" + - "3000" + #ports: + # - "127.0.0.1:10545:8545" + # - "127.0.0.1:4000:3000" + environment: + - "ETH_PROXY_MANAGEMENT_API_HOST=0.0.0.0" + - "UPSTREAM_RPCS" + + feeder: + image: stakesquid/eth-proxy-feeder:latest + restart: always + environment: + - "WSS_ENDPOINT" + command: + - "$WSS_ENDPOINT" + + dispatcher: + image: emeraldpay/dshackle:0.13.1 + restart: unless-stopped + volumes: + - ./proxy:/etc/dshackle + expose: + - 8081 + - 8082 + ports: + - "33333:8080" + + redis: + image: healthcheck/redis:alpine + restart: unless-stopped + environment: + - REDIS_RAM + command: + - "redis-server" + - "--maxmemory ${REDIS_RAM}" + - "--maxmemory-policy allkeys-lru" + - '--save ""' diff --git a/proxy/dshackle.yaml b/proxy/dshackle.yaml new file mode 100644 index 00000000..da50fc52 --- /dev/null +++ b/proxy/dshackle.yaml @@ -0,0 +1,47 @@ +host: 0.0.0.0 +port: 2449 + +tls: + enabled: false + +monitoring: + enabled: true + jvm: false + extended: false + prometheus: + enabled: true + bind: 0.0.0.0 + port: 8081 + path: /metrics + +health: + port: 8082 + host: 0.0.0.0 + path: /health + blockchains: + - chain: ethereum + min-available: 1 + +cache: + redis: + enabled: true + host: redis + password: "" + +proxy: + host: 0.0.0.0 + port: 8080 + tls: + enabled: false + routes: + - id: eth + blockchain: ethereum + +cluster: + defaults: + - chains: + - ethereum + options: + min-peers: 10 + include: + - "proxy.yaml" diff --git a/proxy/proxy.yaml b/proxy/proxy.yaml new file mode 100644 index 00000000..fc2d2faa --- /dev/null +++ b/proxy/proxy.yaml @@ -0,0 +1,10 @@ +upstreams: + - id: proxy + chain: ethereum + priority: 100 + options: + disable-validation: true + connection: + ethereum: + rpc: + url: "http://proxy:8545/1"