added erigon-bsc
This commit is contained in:
38
erigon-bsc.yml
Normal file
38
erigon-bsc.yml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
version: '3.1'
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
erigon-bsc:
|
||||||
|
image: thorax/erigon:latest
|
||||||
|
build: .
|
||||||
|
command: erigon --chain bsc --metrics --metrics.addr=0.0.0.0 --metrics.port=6060 --private.api.addr=0.0.0.0:9090 --pprof --pprof.addr=0.0.0.0 --pprof.port=6061
|
||||||
|
volumes:
|
||||||
|
- erigon-bsc-volume:/home/erigon/.local/share/erigon
|
||||||
|
ports:
|
||||||
|
- "30303:30303/tcp"
|
||||||
|
- "30303:30303/udp"
|
||||||
|
- "30304:30304/tcp"
|
||||||
|
- "30304:30304/udp"
|
||||||
|
network: chains
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
rpcdaemon-bsc:
|
||||||
|
image: thorax/erigon:latest
|
||||||
|
command: rpcdaemon --datadir=/home/erigon/.local/share/erigon --private.api.addr=erigon:9090 --http.addr=0.0.0.0 --http.vhosts=* --http.corsdomain=* --http.api=eth,debug,net --ws
|
||||||
|
pid: service:erigon-bsc # Use erigon's PID namespace. It's required to open Erigon's DB from another process (RPCDaemon local-mode)
|
||||||
|
volumes:
|
||||||
|
- erigon-bsc-volume:/home/erigon/.local/share/erigon
|
||||||
|
ports:
|
||||||
|
- "8545:8545"
|
||||||
|
network: chains
|
||||||
|
restart: unless-stopped
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.middlewares.rpcdaemon-bsc-stripprefix.stripprefix.prefixes=/erigon-bsc"
|
||||||
|
- "traefik.http.services.rpcdaemon-bsc.loadbalancer.server.port=8545"
|
||||||
|
- "traefik.http.routers.rpcdaemon-bsc.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.rpcdaemon-bsc.tls.certresolver=myresolver"
|
||||||
|
- "traefik.http.routers.rpcdaemon-bsc.rule=Host(`$DOMAIN`) && PathPrefix(`/erigon-bsc`)"
|
||||||
|
- "traefik.http.routers.rpcdaemon-bsc.middlewares=rpcdaemon-bsc-stripprefix, ipwhitelist"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
erigon-bsc-volume:
|
||||||
37
erigon-bsc/Dockerfile
Normal file
37
erigon-bsc/Dockerfile
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
FROM docker.io/library/golang:1.18-alpine3.14 AS builder
|
||||||
|
|
||||||
|
RUN apk --no-cache add make gcc g++ linux-headers git bash ca-certificates libgcc libstdc++
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
RUN git clone --recurse-submodules -j8 https://github.com/ledgerwatch/erigon.git .
|
||||||
|
|
||||||
|
# expect that host run `git submodule update --init`
|
||||||
|
RUN make erigon rpcdaemon integration sentry hack db-tools
|
||||||
|
|
||||||
|
FROM docker.io/library/alpine:3.14
|
||||||
|
|
||||||
|
RUN apk add --no-cache ca-certificates libgcc libstdc++ tzdata
|
||||||
|
COPY --from=builder /app/build/bin/* /usr/local/bin/
|
||||||
|
|
||||||
|
RUN adduser -H -u 1000 -g 1000 -D erigon
|
||||||
|
RUN mkdir -p /home/erigon
|
||||||
|
RUN mkdir -p /home/erigon/.local/share/erigon
|
||||||
|
RUN chown -R erigon:erigon /home/erigon
|
||||||
|
|
||||||
|
USER erigon
|
||||||
|
|
||||||
|
EXPOSE 8545 8546 30303 30303/udp 30304 30304/udp 8080 9090 6060
|
||||||
|
|
||||||
|
# https://github.com/opencontainers/image-spec/blob/main/annotations.md
|
||||||
|
ARG BUILD_DATE
|
||||||
|
ARG VCS_REF
|
||||||
|
LABEL org.label-schema.build-date=$BUILD_DATE \
|
||||||
|
org.label-schema.name="Erigon" \
|
||||||
|
org.label-schema.description="Erigon Ethereum Client" \
|
||||||
|
org.label-schema.url="https://torquem.ch" \
|
||||||
|
org.label-schema.vcs-ref=$VCS_REF \
|
||||||
|
org.label-schema.vcs-url="https://github.com/ledgerwatch/erigon.git" \
|
||||||
|
org.label-schema.vendor="Torquem" \
|
||||||
|
org.label-schema.version=$VERSION \
|
||||||
|
org.label-schema.schema-version="1.0"
|
||||||
Reference in New Issue
Block a user