2020-08-19 20:30:52 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Exit if the variable tests fail
|
|
|
|
set -e
|
|
|
|
set +x
|
|
|
|
|
|
|
|
# Check the database variables are set
|
2021-10-21 19:02:22 +00:00
|
|
|
test "$VDB_COMMAND"
|
2020-08-19 20:30:52 +00:00
|
|
|
set +e
|
|
|
|
|
2021-10-21 19:02:22 +00:00
|
|
|
# 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" && \
|
2023-08-25 12:09:40 +00:00
|
|
|
exec sudo ./eth-statediff-service "$VDB_COMMAND" --config=config.toml
|