make changes permanent

This commit is contained in:
Sebastian
2023-09-26 11:32:08 +02:00
parent 9e5f1eb2d7
commit e09547feab
5 changed files with 65 additions and 39 deletions

View File

@@ -40,25 +40,29 @@ services:
driver: local driver: local
nimbus-gnosis: nimbus-gnosis:
build: build:
context: ./nimbus context: ./gnosis/nimbus
args:
UPSTREAM_VERSION: v23.8.0
restart: unless-stopped restart: unless-stopped
stop_grace_period: 1m stop_grace_period: 1m
environment: user: root
NETWORK: gnosis
LOG_TYPE: INFO
P2P_TCP_PORT: 20419
P2P_UDP_PORT: 20419
CHECKPOINT_SYNC_URL: "https://checkpoint.gnosischain.com/"
EXTRA_OPTS: ""
FEE_RECIPIENT_ADDRESS: ""
EXECUTION_ENDPOINT: "http://erigon-gnosis:8551"
volumes: volumes:
- nimbus-gnosis:/home/user/nimbus-eth2/build/data - nimbus-gnosis:/data
- .jwtsecret:/jwt.hex - .jwtsecret:/jwt:ro
environment:
CHECKPOINT_SYNC_URL: "https://checkpoint.gnosischain.com/"
command: |
--data-dir=/data
--web3-url=http://erigon-gnosis:8551
--jwt-secret=/jwt
--light-client-data-serve=true
--light-client-data-import-mode=full
--tcp-port=20419
--udp-port=20419
--rest
--rest-address=0.0.0.0
--network=gnosis
--history=prune
networks: networks:
- chains - chains
ports: ports:

5
gnosis/nimbus/Dockerfile Normal file
View File

@@ -0,0 +1,5 @@
FROM ghcr.io/gnosischain/gnosis-nimbus-eth2:latest
COPY entrypoint.sh /usr/bin/entrypoint.sh
ENTRYPOINT ["/usr/bin/entrypoint.sh"]

17
gnosis/nimbus/entrypoint.sh Executable file
View File

@@ -0,0 +1,17 @@
FROM ghcr.io/gnosischain/gnosis-nimbus-eth2:latest
COPY entrypoint.sh /usr/bin/entrypoint.sh
ENTRYPOINT ["/usr/bin/entrypoint.sh"]root@rpc-fi-1 ~/rpc # cat gnosis/nimbus/entrypoint.sh
#!/bin/bash
# Run checkpoint sync script if provided
[[ -n $CHECKPOINT_SYNC_URL ]] &&
/home/user/nimbus_beacon_node trustedNodeSync \
--network=gnosis \
--trusted-node-url=${CHECKPOINT_SYNC_URL} \
--backfill=false \
--data-dir=/data
exec -c /home/user/nimbus_beacon_node $@

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
NETWORK="${{NETWORK}" NETWORK="${NETWORK}"
VALIDATOR_PORT=3500 VALIDATOR_PORT=3500
DATA_DIR="/home/user/nimbus-eth2/build/data" DATA_DIR="/home/user/nimbus-eth2/build/data"
@@ -18,8 +18,7 @@ HTTP_ENGINE=${EXECUTION_ENDPOINT}
--trusted-node-url=${CHECKPOINT_SYNC_URL} \ --trusted-node-url=${CHECKPOINT_SYNC_URL} \
--backfill=false \ --backfill=false \
--data-dir=//home/user/nimbus-eth2/build/data --data-dir=//home/user/nimbus-eth2/build/data
exec -c /home/user/nimbus-eth2/build/nimbus_beacon_node \
exec -c /home/user/nimbus_beacon_node \
--network=${NETWORK} \ --network=${NETWORK} \
--data-dir=${DATA_DIR} \ --data-dir=${DATA_DIR} \
--tcp-port=$P2P_TCP_PORT \ --tcp-port=$P2P_TCP_PORT \

View File

@@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
date
df -h / | awk 'NR==2 {print "Total: " $2, "Free: " $4}' df -h / | awk 'NR==2 {print "Total: " $2, "Free: " $4}'
find /var/lib/docker/volumes -maxdepth 1 -type d -name 'rpc_*' -exec du -sh {} \; | sort -rh | awk '{cmd="basename "$2; cmd | getline dir; close(cmd); sub(/^rpc_/, "", dir); print $1, dir}' find /var/lib/docker/volumes -maxdepth 1 -type d -name 'rpc_*' -exec du -sh {} \; | sort -rh | awk '{cmd="basename "$2; cmd | getline dir; close(cmd); sub(/^rpc_/, "", dir); print $1, dir}'