tapyrus-cli を -conf 引数なしで実行

デフォルトで $HOME/.tapyrus/tapyrus.conf を探しにいくのでそこに tapyrus.conf を置くと引数なしで実行できる。

以下Dockerの例

tapyrusdイメージでは $HOME/root

置いただけだと読んでくれないので -e で環境変数を渡す。対象は CONF_DIR だがついでなので DATA_DIR も移す。

testnet
$ cat << EOS > tapyrus.conf networkid=1939510133 txindex=1 server=1 rest=1 rpcuser=rpcuser rpcpassword=rpcpassword rpcbind=0.0.0.0 rpcallowip=127.0.0.1 addseeder=static-seed.tapyrus.dev.chaintope.com fallbackfee=0.0002 EOS $ docker run -d --name 'tapyrus_node_testnet_v051' -v $PWD/tapyrus.conf:/root/.tapyrus/tapyrus.conf -e CONF_DIR="/root/.tapyrus" -e DATA_DIR="/root/.tapyrus" -e GENESIS_BLOCK_WITH_SIG='01000000000000000000000000000000000000000000000000000000000000000000000044cc181bd0e95c5b999a13d1fc0d193fa8223af97511ad2098217555a841b3518f18ec2536f0bb9d6d4834fcc712e9563840fe9f089db9e8fe890bffb82165849f52ba5e01210366262690cbdf648132ce0c088962c6361112582364ede120f3780ab73438fc4b402b1ed9996920f57a425f6f9797557c0e73d0c9fbafdebcaa796b136e0946ffa98d928f8130b6a572f83da39530b13784eeb7007465b673aa95091619e7ee208501010000000100000000000000000000000000000000000000000000000000000000000000000000000000ffffffff0100f2052a010000002776a92231415132437447336a686f37385372457a4b6533766636647863456b4a74356e7a4188ac00000000' tapyrus/tapyrusd:v0.5.1

dev
$ cat << EOS > tapyrus.conf rpcuser=rpcuser rpcpassword=rpcpassword bind=0.0.0.0 rpcallowip=0.0.0.0/0 server=1 keypool=1 discover=0 dev=1 [dev] port=12383 rpcport=12381 networkid=1905960821 EOS $ docker run -d --name 'tapyrus_node_dev_v051' -v $PWD/tapyrus.conf:/root/.tapyrus/tapyrus.conf -e CONF_DIR="/root/.tapyrus" -e DATA_DIR="/root/.tapyrus" -e GENESIS_BLOCK_WITH_SIG='0100000000000000000000000000000000000000000000000000000000000000000000002b5331139c6bc8646bb4e5737c51378133f70b9712b75548cb3c05f9188670e7440d295e7300c5640730c4634402a3e66fb5d921f76b48d8972a484cc0361e66ef74f45e012103af80b90d25145da28c583359beb47b21796b2fe1a23c1511e443e7a64dfdb27d40e05f064662d6b9acf65ae416379d82e11a9b78cdeb3a316d1057cd2780e3727f70a61f901d10acbe349cd11e04aa6b4351e782c44670aefbe138e99a5ce75ace01010000000100000000000000000000000000000000000000000000000000000000000000000000000000ffffffff0100f2052a010000001976a91445d405b9ed450fec89044f9b7a99a4ef6fe2cd3f88ac00000000' tapyrus/tapyrusd:v0.5.1