Update README to use docker package on github
This commit is contained in:
parent
ba9d9ce367
commit
e623b85027
2 changed files with 38 additions and 6 deletions
6
Makefile
6
Makefile
|
@ -25,6 +25,12 @@ build:
|
||||||
build-local:
|
build-local:
|
||||||
docker build -t rosetta-bitcoin:latest .
|
docker build -t rosetta-bitcoin:latest .
|
||||||
|
|
||||||
|
build-release:
|
||||||
|
# https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages
|
||||||
|
docker build -t rosetta-bitcoin:$(version) .;
|
||||||
|
docker tag rosetta-bitcoin:$(version) docker.pkg.github.com/coinbase/rosetta-bitcoin/rosetta-bitcoin:$(version);
|
||||||
|
docker push docker.pkg.github.com/coinbase/rosetta-bitcoin/rosetta-bitcoin:$(version);
|
||||||
|
|
||||||
run-mainnet-online:
|
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
|
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
|
||||||
|
|
||||||
|
|
38
README.md
38
README.md
|
@ -34,16 +34,42 @@ As specified in the [Rosetta API Principles](https://www.rosetta-api.org/docs/au
|
||||||
all Rosetta implementations must be deployable via Docker and support running via either an
|
all Rosetta implementations must be deployable via Docker and support running via either an
|
||||||
[`online` or `offline` mode](https://www.rosetta-api.org/docs/node_deployment.html#multiple-modes).
|
[`online` or `offline` mode](https://www.rosetta-api.org/docs/node_deployment.html#multiple-modes).
|
||||||
|
|
||||||
To build a Docker image from this repository, run the command `make build`. To start
|
### Install
|
||||||
`rosetta-bitcoin`, you can run:
|
#### Pre-Built
|
||||||
* `make run-mainnet-online`
|
You can download a pre-built Docker image from GitHub:
|
||||||
* `make run-mainnet-offline`
|
```text
|
||||||
* `make run-testnet-online`
|
docker pull docker.pkg.github.com/coinbase/rosetta-bitcoin/rosetta-bitcoin:v0.0.1
|
||||||
* `make run testnet-offline`
|
```
|
||||||
|
#### From Source
|
||||||
|
You can clone this repository and run the following command:
|
||||||
|
```text
|
||||||
|
docker build -t rosetta-bitcoin:v0.0.1
|
||||||
|
```
|
||||||
|
|
||||||
|
### Run
|
||||||
By default, running these commands will create a data directory at `<working directory>/bitcoin-data`
|
By default, running these commands will create a data directory at `<working directory>/bitcoin-data`
|
||||||
and start the `rosetta-bitcoin` server at port `8080`.
|
and start the `rosetta-bitcoin` server at port `8080`.
|
||||||
|
|
||||||
|
#### Mainnet:Online
|
||||||
|
```text
|
||||||
|
docker run -d --ulimit "nofile=100000:100000" -v "$(shell pwd)/bitcoin-data:/data" -e "MODE=ONLINE" -e "NETWORK=MAINNET" -e "PORT=8080" -p 8080:8080 -p 8333:8333 rosetta-bitcoin:v0.0.1
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Mainnet:Offline
|
||||||
|
```text
|
||||||
|
docker run -d -e "MODE=OFFLINE" -e "NETWORK=MAINNET" -e "PORT=8081" -p 8081:8081 rosetta-bitcoin:v0.0.1
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Testnet:Online
|
||||||
|
```text
|
||||||
|
docker run -d --ulimit "nofile=100000:100000" -v "$(shell pwd)/bitcoin-data:/data" -e "MODE=ONLINE" -e "NETWORK=TESTNET" -e "PORT=8080" -p 8080:8080 -p 18333:18333 rosetta-bitcoin:v0.0.1
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Testnet:Offline
|
||||||
|
```text
|
||||||
|
docker run -d -e "MODE=OFFLINE" -e "NETWORK=TESTNET" -e "PORT=8081" -p 8081:8081 rosetta-bitcoin:v0.0.1
|
||||||
|
```
|
||||||
|
|
||||||
## System Requirements
|
## System Requirements
|
||||||
`rosetta-bitcoin` has been tested on an [AWS c5.2xlarge instance](https://aws.amazon.com/ec2/instance-types/c5).
|
`rosetta-bitcoin` has been tested on an [AWS c5.2xlarge instance](https://aws.amazon.com/ec2/instance-types/c5).
|
||||||
This instance type has 8 vCPU and 16 GB of RAM. If you use a computer with less than 16 GB of RAM,
|
This instance type has 8 vCPU and 16 GB of RAM. If you use a computer with less than 16 GB of RAM,
|
||||||
|
|
Loading…
Reference in a new issue