ENV Variables

This project using ENV variables to store config in the prod environment.

env var list

SECRET_KEY_BASE=ahZc9YkWjt+/QHv1WvZFQAZyDCShIXNzP6HMd1cA6EOOiKV4RYWMXolZ4FEG3nPN
ZCASHD_HOSTNAME=127.0.0.1
ZCASHD_PORT=8232
ZCASHD_USERNAME=user
ZCASHD_PASSWORD=changeme
EXPLORER_HOSTNAME=https://zcashblockexplorer.com
VK_CPUS='0.3'
VK_MEM='1024M'
VK_RUNNER_IMAGE='nighthawkapps/vkrunner'
EXPLORER_SCHEME='https'

be sure that you are using a strong SECRET_KEY_BASE

minimum length needed is 32.

you can generate an acceptable secret using ( once you have all the dependencies installed )

mix phx.gen.secret

VK_CPUS and VK_MEM control how much CPU and RAM is assigned for an individual Viewing Key Import Job.

VK_RUNNER_IMAGE is the Docker image that will be used to run the Viewing Key.

If you running the explorer as a Docker container, the Viewing Key Image has to updated to dind based image.

On non docker based Prod env

you can create a .env file ( added to .gitignore in this project ) and source it.

example:

export SECRET_KEY_BASE=ahZc9YkWjt+/QHv1WvZFQAZyDCShIXNzP6HMd1cA6EOOiKV4RYWMXolZ4FEG3nPN
export ZCASHD_HOSTNAME=127.0.0.1
export ZCASHD_PORT=8232
export ZCASHD_USERNAME=user
export ZCASHD_PASSWORD=changeme
export EXPLORER_HOSTNAME=https://zcashblockexplorer.com
export VK_CPUS='0.3'
export VK_MEM='1024M'
export VK_RUNNER_IMAGE='nighthawkapps/vkrunner'
export EXPLORER_SCHEME='https'

source .env

in the dev env, you can edit config/dev.exs to update the config.

Last updated