Cleaning up README more

This commit is contained in:
Patrick O'Grady 2020-09-21 08:42:00 -07:00
parent f839241ffb
commit 17276c7ccb
No known key found for this signature in database
GPG key ID: 8DE11C985C0C8D85
2 changed files with 19 additions and 8 deletions

View file

@ -26,8 +26,14 @@ build-local:
docker build -t rosetta-bitcoin:latest .
build-release:
# make sure to always set version with vX.X.X
docker build -t rosetta-bitcoin:$(version) .;
docker save rosetta-bitcoin:$(version) | gzip > rosetta-bitcoin-$(version).tar.gz;
docker save rosetta-bitcoin:$(version) | gzip > rosetta-bitcoin.tar.gz;docker load --input rosetta-bitcoin.tar.gz;
pull-remote:
curl -L https://github.com/coinbase/rosetta-bitcoin/releases/latest/download/rosetta-bitcoin.tar.gz -o rosetta-bitcoin.tar.gz;
docker load --input rosetta-bitcoin.tar.gz;
rm rosetta-bitcoin.tar.gz;
run-mainnet-online:
docker run -d --ulimit "nofile=${NOFILE}:${NOFILE}" -v "${PWD}/bitcoin-data:/data" -e "MODE=ONLINE" -e "NETWORK=MAINNET" -e "PORT=8080" -p 8080:8080 -p 8333:8333 rosetta-bitcoin:latest

View file

@ -37,14 +37,19 @@ all Rosetta implementations must be deployable via Docker and support running vi
### Install
#### Pre-Built
You can download a pre-built Docker image from GitHub:
TODO: Change to docker import from a release
TODO: cast version as latest somehow?
TODO: get latest from release info and then can do automatically? Could do another script...
```text
docker pull docker.pkg.github.com/coinbase/rosetta-bitcoin/rosetta-bitcoin:v0.0.1
curl -L https://github.com/coinbase/rosetta-bitcoin/releases/latest/download/rosetta-bitcoin.tar.gz -o rosetta-bitcoin.tar.gz;
docker load --input rosetta-bitcoin.tar.gz;
rm rosetta-bitcoin.tar.gz;
```
_This will print the image tag out that must be used for running in later steps._
#### From Source
You can clone this repository and run the following command:
```text
docker build -t rosetta-bitcoin:v0.0.1
docker build -t rosetta-bitcoin:latest
```
### Run
@ -53,22 +58,22 @@ and start the `rosetta-bitcoin` server at port `8080`.
#### Mainnet:Online
```text
docker run -d --ulimit "nofile=100000:100000" -v "$(pwd)/bitcoin-data:/data" -e "MODE=ONLINE" -e "NETWORK=MAINNET" -e "PORT=8080" -p 8080:8080 -p 8333:8333 rosetta-bitcoin:v0.0.1
docker run -d --ulimit "nofile=100000:100000" -v "$(pwd)/bitcoin-data:/data" -e "MODE=ONLINE" -e "NETWORK=MAINNET" -e "PORT=8080" -p 8080:8080 -p 8333:8333 rosetta-bitcoin:latest
```
#### Mainnet:Offline
```text
docker run -d -e "MODE=OFFLINE" -e "NETWORK=MAINNET" -e "PORT=8081" -p 8081:8081 rosetta-bitcoin:v0.0.1
docker run -d -e "MODE=OFFLINE" -e "NETWORK=MAINNET" -e "PORT=8081" -p 8081:8081 rosetta-bitcoin:latest
```
#### Testnet:Online
```text
docker run -d --ulimit "nofile=100000:100000" -v "$(pwd)/bitcoin-data:/data" -e "MODE=ONLINE" -e "NETWORK=TESTNET" -e "PORT=8080" -p 8080:8080 -p 18333:18333 rosetta-bitcoin:v0.0.1
docker run -d --ulimit "nofile=100000:100000" -v "$(pwd)/bitcoin-data:/data" -e "MODE=ONLINE" -e "NETWORK=TESTNET" -e "PORT=8080" -p 8080:8080 -p 18333:18333 rosetta-bitcoin:latest
```
#### Testnet:Offline
```text
docker run -d -e "MODE=OFFLINE" -e "NETWORK=TESTNET" -e "PORT=8081" -p 8081:8081 rosetta-bitcoin:v0.0.1
docker run -d -e "MODE=OFFLINE" -e "NETWORK=TESTNET" -e "PORT=8081" -p 8081:8081 rosetta-bitcoin:latest
```
## System Requirements