Docker (breaking changes): use thorax/erigon image (#2277)

This commit is contained in:
Alex Sharov 2021-07-09 15:37:36 +07:00 committed by GitHub
parent e5ea85005e
commit fbf2a6bf98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 30 deletions

View File

@ -1,31 +1,20 @@
FROM golang:1.16-alpine3.13 as builder
ARG git_commit
ENV GIT_COMMIT=$git_commit
ARG git_branch
ENV GIT_BRANCH=$git_branch
ARG git_tag
ENV GIT_TAG=$git_tag
# for linters to avoid warnings. we won't use linters in Docker anyway
ENV LATEST_COMMIT="undefined"
RUN apk --no-cache add make gcc g++ linux-headers git bash ca-certificates libgcc libstdc++
WORKDIR /app
# next 2 lines helping utilize docker cache
COPY go.mod go.sum ./
RUN go mod download
ADD . .
RUN make all
FROM alpine:3.13
RUN mkdir -p /var/lib/erigon
VOLUME /var/lib/erigon
RUN apk add --no-cache ca-certificates libgcc libstdc++ tzdata
COPY --from=builder /app/build/bin/* /usr/local/bin/
EXPOSE 8545 8546 30303 30303/udp 8080 9090 6060
WORKDIR /var/lib/erigon
EXPOSE 8545 8546 30303 30303/udp 30304 30304/udp 8080 9090 6060

View File

@ -3,37 +3,43 @@ version: '2.2'
services:
erigon:
image: turbo-geth:latest
image: thorax/erigon:latest
build: .
command: erigon --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"
command: erigon --datadir=/var/lib/erigon --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:
- ${XDG_DATA_HOME:-~/.local/share}/erigon:/root/.local/share/erigon
- ${XDG_DATA_HOME:-~/.local/share}/erigon:/var/lib/erigon
ports:
- 30303:30303/tcp
- 30303:30303/udp
- "30303:30303/tcp"
- "30303:30303/udp"
- "30304:30304/tcp"
- "30304:30304/udp"
restart: unless-stopped
prometheus:
image: prom/prometheus:v2.27.1
image: prom/prometheus:v2.28.1
command: --log.level=warn --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus --web.console.libraries=/usr/share/prometheus/console_libraries --web.console.templates=/usr/share/prometheus/consoles
ports:
- 9090:9090
- "9090:9090"
volumes:
- ${ERIGON_PROMETHEUS_CONFIG:-./cmd/prometheus/prometheus.yml}:/etc/prometheus/prometheus.yml
- ${XDG_DATA_HOME:-~/.local/share}/erigon-prometheus:/prometheus
restart: unless-stopped
grafana:
image: grafana/grafana:8.0.3
image: grafana/grafana:8.0.4
ports:
- 3000:3000
- "3000:3000"
volumes:
- ${ERIGON_GRAFANA_CONFIG:-./cmd/prometheus/grafana.ini}:/etc/grafana/grafana.ini
- ./cmd/prometheus/datasources:/etc/grafana/provisioning/datasources
- ./cmd/prometheus/dashboards:/etc/grafana/provisioning/dashboards
- ${XDG_DATA_HOME:-~/.local/share}/erigon-grafana:/var/lib/grafana
restart: unless-stopped
rpcdaemon:
image: turbo-geth:latest
command: rpcdaemon --private.api.addr="erigon:9090" --http.addr="0.0.0.0" --http.vhosts="*" --http.corsdomain="*" --http.api="eth,debug,net"
image: thorax/erigon:latest
command: rpcdaemon --private.api.addr=erigon:9090 --http.addr=0.0.0.0 --http.vhosts=* --http.corsdomain=* --http.api=eth,debug,net
ports:
- 8545:8545
- "8545:8545"
restart: unless-stopped