add blockchain cache
This commit is contained in:
		
							parent
							
								
									5290abb4b8
								
							
						
					
					
						commit
						14c754884e
					
				| @ -125,6 +125,9 @@ ENV HOME /var/lib/steemd | |||||||
| RUN useradd -s /bin/bash -m -d /var/lib/steemd steemd | RUN useradd -s /bin/bash -m -d /var/lib/steemd steemd | ||||||
| RUN chown steemd:steemd -R /var/lib/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"] | VOLUME ["/var/lib/steemd"] | ||||||
| 
 | 
 | ||||||
| # rpc service: | # rpc service: | ||||||
|  | |||||||
| @ -53,6 +53,14 @@ cd $HOME | |||||||
| # overwrite local config with image one | # overwrite local config with image one | ||||||
| cp /etc/steemd/config.ini $HOME/config.ini | 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 | # slow down restart loop if flapping | ||||||
| sleep 1 | sleep 1 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user