eth-statediff-service/startup_script.sh
Roy Crihfield a5125c706c Refactor to use plugeth-statediff (#1)
* Updates to the v5 schema, by delegating to the statediff plugin (as of this branch cerc-io/plugeth-statediff#15), replacing the builder code.
* Adds basic CI workflows
* Updates Docker config and docs, cleans up some things

Reviewed-on: #1
2023-09-28 04:03:59 +00:00

21 lines
650 B
Bash
Executable File

#!/bin/sh
# Exit if the variable tests fail
set -e
set +x
# Check the database variables are set
test "$VDB_COMMAND"
set +e
# docker must be run in privilaged mode for mounts to work
echo "Setting up /app/geth-rw overlayed /app/geth-ro"
mkdir -p /tmp/overlay && \
sudo mount -t tmpfs tmpfs /tmp/overlay && \
mkdir -p /tmp/overlay/upper && \
mkdir -p /tmp/overlay/work && \
mkdir -p /app/geth-rw && \
sudo mount -t overlay overlay -o lowerdir=/app/geth-ro,upperdir=/tmp/overlay/upper,workdir=/tmp/overlay/work /app/geth-rw && \
echo "Running the statediff service" && \
exec sudo ./eth-statediff-service "$VDB_COMMAND" --config=/config/config.toml