add blockchain cache

This commit is contained in:
Jeffrey Paul 2016-09-02 05:03:19 +02:00
parent 5290abb4b8
commit 14c754884e
2 changed files with 11 additions and 0 deletions

View File

@ -125,6 +125,9 @@ ENV HOME /var/lib/steemd
RUN useradd -s /bin/bash -m -d /var/lib/steemd steemd
RUN chown steemd:steemd -R /var/lib/steemd
# include blockchain seed in docker image to speed up startup
ADD https://cdn.datavibe.net/f/eeqj/20160902.steemd-blockchain.tar.bz2 /var/cache/steemd/blockchain.tbz2
VOLUME ["/var/lib/steemd"]
# rpc service:

View File

@ -53,6 +53,14 @@ cd $HOME
# overwrite local config with image one
cp /etc/steemd/config.ini $HOME/config.ini
# if no blockchain in volume, use seed from image and verify
if [[ ! -d /var/lib/steemd/blockchain ]]; then
cd /var/lib/steemd
tar xvjpf /var/cache/steemd/blockchain.tbz2
chown -R steemd:steemd blockchain
ARGS+=" --replay-blockchain"
fi
# slow down restart loop if flapping
sleep 1