diff --git a/README.md b/README.md index 397c6a1e..4bfd49b5 100644 --- a/README.md +++ b/README.md @@ -18,4 +18,4 @@ For a quick testnet start, you can install prerequisites and configure eth-docke # Version -This is eth-docker v1.5.8 +This is eth-docker v1.5.9 diff --git a/besu.yml b/besu.yml index 412a6d05..d06c1b35 100644 --- a/besu.yml +++ b/besu.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: execution: restart: "${RESTART}" @@ -24,6 +31,7 @@ services: default: aliases: - eth1 + <<: *logging entrypoint: - docker-entrypoint.sh - /opt/besu/bin/besu diff --git a/blank-grafana.yml b/blank-grafana.yml index 3e5b3248..39f89636 100644 --- a/blank-grafana.yml +++ b/blank-grafana.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: prometheus: restart: "${RESTART}" @@ -14,6 +21,7 @@ services: - CLIENT=${COMPOSE_FILE} expose: - 9090/tcp + <<: *logging entrypoint: choose-config.sh command: ["/bin/prometheus", "--storage.tsdb.path=/prometheus", "--web.console.libraries=/usr/share/prometheus/console_libraries", "--web.console.templates=/usr/share/prometheus/consoles"] depends_on: @@ -38,6 +46,7 @@ services: - /etc/timezone:/etc/TZ:ro expose: - 9100/tcp + <<: *logging grafana: restart: "${RESTART}" build: @@ -53,6 +62,7 @@ services: - prometheus expose: - ${GRAFANA_PORT}/tcp + <<: *logging labels: - traefik.enable=true - traefik.http.routers.grafana.entrypoints=web,websecure diff --git a/default.env b/default.env index 7a5e4680..f0870908 100644 --- a/default.env +++ b/default.env @@ -35,12 +35,14 @@ CC_HOST=cc DDNS_SUBDOMAIN= DDNS_PROXY=true -# Teku/LH rapid sync via initial state/checkpoint. Please create an Infura eth2/beacon project first, then replace the {projectid} and {secret} here -# and use one of these lines instead of the empty one +# Teku/Lighthouse/Lodestar rapid sync via initial state/checkpoint. For Teku or Lighthouse, please create an Infura +# eth2/beacon project first, then replace the {projectid} and {secret} here and use one of these lines instead of the empty one #TEKU_RAPID_SYNC=--initial-state=https://{projectid}:{secret}@eth2-beacon-${NETWORK}.infura.io/eth/v1/debug/beacon/states/finalized #LH_RAPID_SYNC=--checkpoint-sync-url=https://{projectid}:{secret}@eth2-beacon-${NETWORK}.infura.io/ TEKU_RAPID_SYNC= LH_RAPID_SYNC= +# Set this to true to rapid sync Lodestar +LS_RAPID_SYNC=false # Consensus client address. This could be comma-separated for Lighthouse, with Infura as failover, # or could just be a remote consensus client URL for Teku, Lighthouse or Prysm "validator only" setups. Not in use for Nimbus. diff --git a/erigon.yml b/erigon.yml index 50d93947..0bbf3607 100644 --- a/erigon.yml +++ b/erigon.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: erigon: restart: "${RESTART}" @@ -24,6 +31,7 @@ services: default: aliases: - eth1 + <<: *logging entrypoint: - docker-entrypoint.sh - erigon diff --git a/geth.yml b/geth.yml index ae12eebc..3cde6109 100644 --- a/geth.yml +++ b/geth.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: execution: restart: "${RESTART}" @@ -24,6 +31,7 @@ services: default: aliases: - eth1 + <<: *logging entrypoint: - docker-entrypoint.sh - geth diff --git a/lh-base-notz.yml b/lh-base-notz.yml index bdfe383d..8bbaeb4a 100644 --- a/lh-base-notz.yml +++ b/lh-base-notz.yml @@ -1,5 +1,12 @@ # Version without timezone, for use with Amazon Linux 2 and similar version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: consensus: restart: "${RESTART}" @@ -22,6 +29,7 @@ services: default: aliases: - eth2 + <<: *logging entrypoint: - docker-entrypoint.sh - lighthouse @@ -49,6 +57,7 @@ services: image: lighthouse:local volumes: - lhvalidator-data:/var/lib/lighthouse + <<: *logging entrypoint: - docker-entrypoint.sh - lighthouse diff --git a/lh-base.yml b/lh-base.yml index 05c9b028..4d6397e2 100644 --- a/lh-base.yml +++ b/lh-base.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: consensus: restart: "${RESTART}" @@ -23,6 +30,7 @@ services: default: aliases: - eth2 + <<: *logging entrypoint: - docker-entrypoint.sh - lighthouse @@ -52,6 +60,7 @@ services: - lhvalidator-data:/var/lib/lighthouse - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro + <<: *logging entrypoint: - docker-entrypoint.sh - lighthouse diff --git a/lh-consensus.yml b/lh-consensus.yml index f72c2f17..2e43ee27 100644 --- a/lh-consensus.yml +++ b/lh-consensus.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: consensus: restart: "${RESTART}" @@ -24,6 +31,7 @@ services: default: aliases: - eth2 + <<: *logging entrypoint: - docker-entrypoint.sh - lighthouse diff --git a/lh-grafana.yml b/lh-grafana.yml index cdec96ca..2b7aea62 100644 --- a/lh-grafana.yml +++ b/lh-grafana.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: consensus: expose: @@ -31,6 +38,7 @@ services: - 9090/tcp entrypoint: choose-config.sh command: ["/bin/prometheus", "--storage.tsdb.path=/prometheus", "--web.console.libraries=/usr/share/prometheus/console_libraries", "--web.console.templates=/usr/share/prometheus/consoles"] + <<: *logging depends_on: - consensus - validator @@ -55,6 +63,7 @@ services: - /etc/timezone:/etc/TZ:ro expose: - 9100/tcp + <<: *logging grafana: restart: "${RESTART}" build: @@ -70,6 +79,7 @@ services: - prometheus expose: - ${GRAFANA_PORT}/tcp + <<: *logging labels: - traefik.enable=true - traefik.http.routers.grafana.entrypoints=web,websecure diff --git a/lh-validator-notz.yml b/lh-validator-notz.yml index 7fe2d2f6..dcbb316c 100644 --- a/lh-validator-notz.yml +++ b/lh-validator-notz.yml @@ -1,11 +1,19 @@ # Version without timezone, for use with Amazon Linux 2 and similar version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: validator: restart: "${RESTART}" image: lighthouse:local volumes: - lhvalidator-data:/var/lib/lighthouse + <<: *logging entrypoint: - docker-entrypoint.sh - lighthouse diff --git a/lh-validator.yml b/lh-validator.yml index 5b915c51..9666780a 100644 --- a/lh-validator.yml +++ b/lh-validator.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: validator: restart: "${RESTART}" @@ -7,6 +14,7 @@ services: - lhvalidator-data:/var/lib/lighthouse - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro + <<: *logging entrypoint: - docker-entrypoint.sh - lighthouse diff --git a/lodestar-base.yml b/lodestar-base.yml index 32c5b93c..2ddcdad1 100644 --- a/lodestar-base.yml +++ b/lodestar-base.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: consensus: restart: "${RESTART}" @@ -20,10 +27,11 @@ services: - ${LS_PORT}:${LS_PORT}/udp expose: - 9596/tcp + <<: *logging entrypoint: - node - - --max-old-space-size=8192 - - /usr/app/packages/cli/bin/lodestar + - --max-old-space-size=6144 + - /usr/app/node_modules/.bin/lodestar - beacon - --rootDir - /var/lib/lodestar/consensus @@ -37,6 +45,8 @@ services: - "/ip4/0.0.0.0/tcp/${LS_PORT}" - --eth1.providerUrl - ${EC_NODE} + - --weakSubjectivitySyncLatest + - ${LS_RAPID_SYNC} - --logLevel - ${LOG_LEVEL} - --network @@ -55,6 +65,7 @@ services: - lsvalidator-data:/var/lib/lodestar/validators - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro + <<: *logging entrypoint: - node - --max-old-space-size=8192 diff --git a/lodestar/Dockerfile.binary b/lodestar/Dockerfile.binary index ce61d700..39aa808c 100644 --- a/lodestar/Dockerfile.binary +++ b/lodestar/Dockerfile.binary @@ -41,4 +41,4 @@ RUN adduser \ # Create data mount point with permissions RUN mkdir -p /var/lib/lodestar/validators && chown ${USER}:${USER} /var/lib/lodestar/validators && chmod 700 /var/lib/lodestar/validators -ENTRYPOINT ["node", "--max-old-space-size=8192", "/usr/app/packages/cli/bin/lodestar"] +ENTRYPOINT ["node", "--max-old-space-size=6144", "/usr/app/node_modules/.bin/lodestar"] diff --git a/lodestar/Dockerfile.source b/lodestar/Dockerfile.source index 86f6b30e..1866901e 100644 --- a/lodestar/Dockerfile.source +++ b/lodestar/Dockerfile.source @@ -1,4 +1,4 @@ -FROM node:16-alpine as build +FROM node:14-alpine as build # Here only to avoid build-time errors ARG DOCKER_TAG @@ -10,15 +10,14 @@ RUN ln -s /usr/bin/python3 /usr/bin/python WORKDIR /usr/app -RUN bash -c "git clone https://github.com/ChainSafe/lodestar.git && cd lodestar && git config advice.detachedHead false && git fetch --all --tags && git checkout ${BUILD_TARGET} && yarn install --non-interactive --frozen-lockfile && node ./scripts/getGitData /usr/app/lodestar/.git-data.json && rm -r .git" +RUN bash -c "git clone https://github.com/ChainSafe/lodestar.git && cd lodestar && git config advice.detachedHead false && git fetch --all --tags && git checkout ${BUILD_TARGET} && yarn install --non-interactive --frozen-lockfile && yarn build && cd packages && npm install && npm install ./cli" -FROM node:16-alpine +FROM node:14-alpine RUN apk update && apk add --no-cache ca-certificates tzdata bash su-exec && rm -rf /var/cache/apk/* WORKDIR /usr/app -COPY --from=build /usr/app/lodestar . -ENV DOCKER_LODESTAR_GIT_DATA_FILEPATH /usr/app/.git-data.json +COPY --from=build /usr/app/lodestar/ . # Scripts that handle permissions COPY ./validator-import.sh /usr/local/bin/ @@ -54,4 +53,4 @@ RUN adduser \ # Create data mount point with permissions RUN mkdir -p /var/lib/lodestar/validators && chown ${USER}:${USER} /var/lib/lodestar/validators && chmod 700 /var/lib/lodestar/validators -ENTRYPOINT ["node", "--max-old-space-size=8192", "/usr/app/packages/cli/bin/lodestar"] +ENTRYPOINT ["node", "--max-old-space-size=6144", "/usr/app/node_modules/.bin/lodestar"] diff --git a/nimbus-base.yml b/nimbus-base.yml index fbf598fd..b1fd38be 100644 --- a/nimbus-base.yml +++ b/nimbus-base.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: consensus: restart: "${RESTART}" @@ -21,6 +28,7 @@ services: default: aliases: - eth2 + <<: *logging entrypoint: - docker-entrypoint.sh - /usr/local/bin/nimbus_beacon_node diff --git a/nimbus-grafana.yml b/nimbus-grafana.yml index ec1da3be..0e069b23 100644 --- a/nimbus-grafana.yml +++ b/nimbus-grafana.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: consensus: expose: @@ -23,6 +30,7 @@ services: - 9090/tcp entrypoint: choose-config.sh command: ["/bin/prometheus", "--storage.tsdb.path=/prometheus", "--web.console.libraries=/usr/share/prometheus/console_libraries", "--web.console.templates=/usr/share/prometheus/consoles"] + <<: *logging depends_on: - consensus - node-exporter @@ -46,6 +54,7 @@ services: - /etc/timezone:/etc/TZ:ro expose: - 9100/tcp + <<: *logging grafana: restart: "${RESTART}" build: @@ -61,6 +70,7 @@ services: - prometheus expose: - ${GRAFANA_PORT}/tcp + <<: *logging labels: - traefik.enable=true - traefik.http.routers.grafana.entrypoints=web,websecure diff --git a/nm.yml b/nm.yml index a2ae1160..c3f53449 100644 --- a/nm.yml +++ b/nm.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: execution: restart: "${RESTART}" @@ -22,6 +29,7 @@ services: default: aliases: - eth1 + <<: *logging entrypoint: - docker-entrypoint.sh - dotnet diff --git a/prysm-base.yml b/prysm-base.yml index 27c49ae1..20959d18 100644 --- a/prysm-base.yml +++ b/prysm-base.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + x-build: &prysm-build context: ./prysm dockerfile: ${PRYSM_DOCKERFILE} @@ -27,6 +34,7 @@ services: default: aliases: - eth2 + <<: *logging entrypoint: - docker-entrypoint.sh - beacon-chain @@ -64,6 +72,7 @@ services: - prysmvalidator-data:/var/lib/prysm - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro + <<: *logging entrypoint: - docker-entrypoint.sh - validator diff --git a/prysm-consensus.yml b/prysm-consensus.yml index 322013a0..9af2a886 100644 --- a/prysm-consensus.yml +++ b/prysm-consensus.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + x-build: &prysm-build context: ./prysm dockerfile: ${PRYSM_DOCKERFILE} @@ -30,6 +37,7 @@ services: default: aliases: - eth2 + <<: *logging entrypoint: - docker-entrypoint.sh - beacon-chain diff --git a/prysm-grafana.yml b/prysm-grafana.yml index b488bdb7..e0bd5119 100644 --- a/prysm-grafana.yml +++ b/prysm-grafana.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: consensus: expose: @@ -28,6 +35,7 @@ services: - 9090/tcp entrypoint: choose-config.sh command: ["/bin/prometheus", "--storage.tsdb.path=/prometheus", "--web.console.libraries=/usr/share/prometheus/console_libraries", "--web.console.templates=/usr/share/prometheus/consoles"] + <<: *logging depends_on: - consensus - validator @@ -55,6 +63,7 @@ services: - /etc/timezone:/etc/TZ:ro expose: - 9100/tcp + <<: *logging blackbox-exporter: restart: "${RESTART}" image: prom/blackbox-exporter:master @@ -64,6 +73,7 @@ services: - /etc/localtime:/etc/localtime:ro expose: - 9115/tcp + <<: *logging command: - --config.file=/config/blackbox.yml json-exporter: @@ -75,6 +85,7 @@ services: - /etc/localtime:/etc/localtime:ro expose: - 7979/tcp + <<: *logging command: - --config.file - /config/json.yml @@ -91,6 +102,7 @@ services: - TZ=Europe/Zurich expose: - 9745/tcp + <<: *logging grafana: restart: "${RESTART}" build: @@ -106,6 +118,7 @@ services: - prometheus expose: - ${GRAFANA_PORT}/tcp + <<: *logging labels: - traefik.enable=true - traefik.http.routers.grafana.entrypoints=web,websecure diff --git a/prysm-validator.yml b/prysm-validator.yml index cc48b1da..679a9123 100644 --- a/prysm-validator.yml +++ b/prysm-validator.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + x-build: &prysm-build context: ./prysm dockerfile: ${PRYSM_DOCKERFILE} @@ -18,6 +25,7 @@ services: - prysmvalidator-data:/var/lib/prysm - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro + <<: *logging entrypoint: - validator - --datadir diff --git a/teku-base-notz.yml b/teku-base-notz.yml index 943a8325..c19c4cd0 100644 --- a/teku-base-notz.yml +++ b/teku-base-notz.yml @@ -1,5 +1,12 @@ # Version without timezone, for use with Amazon Linux 2 and similar version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: consensus: restart: "${RESTART}" @@ -22,6 +29,7 @@ services: default: aliases: - eth2 + <<: *logging entrypoint: - docker-entrypoint.sh - /opt/teku/bin/teku diff --git a/teku-base.yml b/teku-base.yml index bf1d9888..a1b292a4 100644 --- a/teku-base.yml +++ b/teku-base.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: consensus: restart: "${RESTART}" @@ -23,6 +30,7 @@ services: default: aliases: - eth2 + <<: *logging entrypoint: - docker-entrypoint.sh - /opt/teku/bin/teku diff --git a/teku-consensus.yml b/teku-consensus.yml index 38fe9ffb..99685077 100644 --- a/teku-consensus.yml +++ b/teku-consensus.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: consensus: restart: "${RESTART}" @@ -24,6 +31,7 @@ services: default: aliases: - eth2 + <<: *logging entrypoint: - docker-entrypoint.sh - /opt/teku/bin/teku diff --git a/teku-grafana.yml b/teku-grafana.yml index afb65226..9de84f85 100644 --- a/teku-grafana.yml +++ b/teku-grafana.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: consensus: expose: @@ -23,6 +30,7 @@ services: - CLIENT=${COMPOSE_FILE} expose: - 9090/tcp + <<: *logging entrypoint: choose-config.sh command: ["/bin/prometheus", "--storage.tsdb.path=/prometheus", "--web.console.libraries=/usr/share/prometheus/console_libraries", "--web.console.templates=/usr/share/prometheus/consoles"] depends_on: @@ -48,6 +56,7 @@ services: - /etc/timezone:/etc/TZ:ro expose: - 9100/tcp + <<: *logging grafana: restart: "${RESTART}" build: @@ -63,6 +72,7 @@ services: - prometheus expose: - ${GRAFANA_PORT}/tcp + <<: *logging labels: - traefik.enable=true - traefik.http.routers.grafana.entrypoints=web,websecure diff --git a/teku-validator-notz.yml b/teku-validator-notz.yml index 035c4021..6588e28e 100644 --- a/teku-validator-notz.yml +++ b/teku-validator-notz.yml @@ -1,5 +1,12 @@ # Version without timezone, for use with Amazon Linux 2 and similar version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: validator: restart: "${RESTART}" @@ -12,6 +19,7 @@ services: image: teku:local volumes: - teku-data:/var/lib/teku + <<: *logging entrypoint: - docker-entrypoint.sh - /opt/teku/bin/teku diff --git a/teku-validator.yml b/teku-validator.yml index 56536ad3..f1eca8ae 100644 --- a/teku-validator.yml +++ b/teku-validator.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: validator: restart: "${RESTART}" @@ -13,6 +20,7 @@ services: - teku-data:/var/lib/teku - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro + <<: *logging entrypoint: - docker-entrypoint.sh - /opt/teku/bin/teku diff --git a/traefik-aws.yml b/traefik-aws.yml index 156b2718..5b701e24 100644 --- a/traefik-aws.yml +++ b/traefik-aws.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: traefik: image: traefik-aws @@ -34,6 +41,7 @@ services: - ~/.aws:/root/.aws:ro - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro + <<: *logging eth: depends_on: - traefik diff --git a/traefik-cf.yml b/traefik-cf.yml index 8769b938..6851201a 100644 --- a/traefik-cf.yml +++ b/traefik-cf.yml @@ -1,4 +1,11 @@ version: "3.4" +x-logging: &logging + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + services: traefik: image: traefik:latest @@ -31,6 +38,7 @@ services: - certs:/letsencrypt - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro + <<: *logging depends_on: - cf-ddns cf-ddns: @@ -44,6 +52,7 @@ services: volumes: - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro + <<: *logging eth: depends_on: - traefik