bitfeed/server
2022-05-18 15:11:23 +00:00
..
bitcoinex Docker config, compatibility & env var support 2022-01-23 16:54:04 -06:00
config Handle transaction floods 2022-03-05 10:24:24 -06:00
data Index spends, add to api and tx overlay 2022-04-23 16:06:05 -06:00
lib v2.3.1 bug fixes 2022-05-18 15:11:23 +00:00
log Add log dir to the repo 2022-01-28 02:26:12 -05:00
priv/static Prep server for monorepo 2021-12-02 17:00:19 -06:00
rel Prep server for monorepo 2021-12-02 17:00:19 -06:00
test Prep server for monorepo 2021-12-02 17:00:19 -06:00
.formatter.exs Prep server for monorepo 2021-12-02 17:00:19 -06:00
.gitignore Next/previous block navigation 2022-04-24 17:42:41 -06:00
artillerytest.yml Prep server for monorepo 2021-12-02 17:00:19 -06:00
bitcoin.conf.example Add proper instructions 2022-01-30 12:51:15 -06:00
bitfeed.service Squash bugs. Update READMEs & docker config 2022-02-18 20:56:09 -06:00
Dockerfile Use Logger 2022-03-03 18:33:38 -06:00
LICENSE.txt Add licenses and readme 2021-12-02 17:04:00 -06:00
mix.exs Update version to 2.3.1 2022-05-18 14:40:37 +00:00
mix.lock Index spends, add to api and tx overlay 2022-04-23 16:06:05 -06:00
README.md Make rocksdb dependency optional 2022-05-17 22:19:16 +00:00

Building and Running the Bitfeed API Server

Prerequisites

Installation

Set the MIX_TARGET environment variable to choose a build target (defaults to "personal")

"personal" - tailored to low traffic personal deployments. resource-intensive features & dependencies disabled

export MIX_TARGET=personal

or

"public" - tailored to high traffic, high performance public deployments.

export MIX_TARGET=public

feature "public" "personal"
Spend index
mix do deps.get
mix do deps.compile

Configuration

The API server expects the following environment variables to be set:

variable usage
MIX_ENV compilation environment, either "prod" or "dev"
PORT Port to expose the API (front end connects to this)
LOG_LEVEL Tailor logging verbosity. either "error", "info" (default) or "debug"
RPC_POOLS Number of connection pools for RPC requests to Bitcoin Core
RPC_POOL_SIZE Number of connections maintained per pool (RPC_POOLS x RPC_POOL_SIZE should be substantially lower than rpcworkqueue in bitcoin.conf)
BITCOIN_HOST Bitcoin node host address
BITCOIN_ZMQ_RAWBLOCK_PORT Bitcoin node ZMQ port for block events (to match zmqpubrawblock in bitcoin.conf)
BITCOIN_ZMQ_RAWTX_PORT Bitcoin node ZMQ port for transaction events (to match zmqpubrawtx in bitcoin.conf)
BITCOIN_ZMQ_SEQUENCE_PORT Bitcoin node ZMQ port for sequence events (to match zmqpubsequence in bitcoin.conf)
BITCOIN_RPC_PORT Bitcoin node RPC port
either
BITCOIN_RPC_USER Bitcoin node RPC user
BITCOIN_RPC_PASS Bitcoin node RPC password
or
BITCOIN_RPC_COOKIE absolute path to a Bitcoin node RPC authentication .cookie file

Running in development

Compile and run in an interactive local shell:

iex -S mix

Building for production

mix release

Running production build

_build/prod/rel/prod/bin/prod start