Files

70 lines
2.1 KiB
Bash
Raw Permalink Normal View History

2020-07-27 21:25:31 -07:00
#!/bin/bash
2021-01-11 16:22:27 -08:00
# Docker containers for the below infrastructure is described here:
2022-04-28 11:52:03 -07:00
# https://CashStack.info
2021-01-11 16:22:27 -08:00
# Pre-synced databases can be downloaded on the CashStrap page:
# https://fullstack.cash/cashstrap
2021-01-11 15:33:45 -08:00
# Which network are you using?
2020-07-27 21:25:31 -07:00
export NETWORK=mainnet
2021-01-11 15:33:45 -08:00
#export NETWORK=testnet
# Full node
export RPC_IP=<ip>:8332
export RPC_BASEURL=http://$RPC_IP/
export RPC_USERNAME=bitcoin
export RPC_PASSWORD=password
2020-07-27 21:25:31 -07:00
# (optional) If load-balancing multiple full nodes, it's best to pick a single
# one for broadcasting transactions to the network. Prevents accidental
# double spends.
#export RPC_SENDURL=http://$RPC_IP/
2022-04-28 11:52:03 -07:00
# psf-slp-indxer
export SLP_INDEXER_API=http://<ip>:<port>/
2020-07-27 21:25:31 -07:00
# Mainnet Fulcrum / ElectrumX
export FULCRUM_API=http://172.17.0.1:3001/v1/
2020-07-27 21:25:31 -07:00
2021-01-11 16:22:27 -08:00
# Redis DB - Used for rate limiting - customize to your own Redis installation.
export REDIS_PORT=6379
export REDIS_HOST=172.17.0.1
2021-01-11 15:33:45 -08:00
# JWT Token Secret
# This is used to verify JWT tokens generated with jwt-bch-api:
# https://github.com/Permissionless-Software-Foundation/jwt-bch-api
2020-07-27 21:25:31 -07:00
export TOKENSECRET=somelongpassword
2020-11-08 17:04:17 -08:00
# So that bch-api can call bch-js locally.
2022-04-28 11:52:03 -07:00
export LOCAL_RESTURL=http://127.0.0.1:3000/v5/
2020-11-08 17:04:17 -08:00
2020-11-11 07:48:40 -08:00
# Basic Authentication password
export PRO_PASS=somerandomepassword:someotherrandompassword:aThirdPassword
2020-11-08 17:04:17 -08:00
2021-01-11 15:33:45 -08:00
# Whitelisted domains. Automatically give pro-tier rate limit access to apps
# that originate froma domain on the whitelist.
export WHITELIST_DOMAINS=fullstack.cash,psfoundation.cash,torlist.cash
# Uncomment the line below if you do not want to use rate limits
#export export DO_NOT_USE_RATE_LIMITS=1
# Rate Limits. Numbers are divided into 1000. e.g. 10000 / 500 = 20 RPM for ANON.
2021-01-11 15:33:45 -08:00
# Requests use the ANON rate limit if they fail to pass in a JWT token.
# ANON = 20 requests per minute (RPM)
export ANON_RATE_LIMIT=500
# 10 = 1000 RPM
export WHITELIST_RATE_LIMIT=100
2021-01-11 15:33:45 -08:00
2021-01-13 07:51:08 -06:00
# Set logging parameters
#1m means no more than 1 megabyte
export LOG_MAX_SIZE=1m
#5d means store no more than 5 days
export LOG_MAX_FILES=5d
# (Optional) if using a bcash node, set this variable. Otherwise leave it as-is.
export BCASH_SERVER=http://localhost
2022-01-16 06:39:37 -08:00
# PSF SLP indexer
export SLP_INDEXER_API=https://psf-slp-indexer.fullstack.cash/
2020-07-27 21:25:31 -07:00
npm start