Merge pull request #11 from chamunks/master
Got chainquery working with this commit.
This commit is contained in:
commit
7f98c54780
3 changed files with 70 additions and 29 deletions
|
@ -30,6 +30,7 @@ services:
|
||||||
- 3306
|
- 3306
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/db:/var/lib/mysql
|
- ./data/db:/var/lib/mysql
|
||||||
|
- ./my.cnf:/etc/mysql/conf.d/chainquery-optimizations.cnf
|
||||||
|
|
||||||
################
|
################
|
||||||
## Chainquery ##
|
## Chainquery ##
|
||||||
|
|
9
chainquery/my.cnf
Normal file
9
chainquery/my.cnf
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Default Homebrew MySQL server config
|
||||||
|
[mysqld]
|
||||||
|
# Only allow connections from localhost
|
||||||
|
innodb_log_file_size=5G
|
||||||
|
key_buffer_size=1G
|
||||||
|
innodb_flush_log_at_trx_commit = 0
|
||||||
|
innodb_autoinc_lock_mode=2
|
||||||
|
innodb_buffer_pool_size=1G
|
||||||
|
innodb_log_buffer_size=1G
|
|
@ -1,20 +1,34 @@
|
||||||
#!/bin/bash
|
# #!/bin/bash
|
||||||
## ToDo:
|
# ## ToDo:
|
||||||
## Get a test case to see if this is the first run or a repeat run
|
# ## Get a test case to see if this is the first run or a repeat run
|
||||||
## If it's a first run you need to do a full index including all transactions
|
# ## If it's a first run you need to do a full index including all transactions
|
||||||
## tx index creates an index of every single transaction in the block history if
|
# ## tx index creates an index of every single transaction in the block history if
|
||||||
## not specified it will only create an index for transactions that are related to the wallet or have unspent outputs.
|
# ## not specified it will only create an index for transactions that are related to the wallet or have unspent outputs.
|
||||||
## This is specific to chainquery.
|
# ## This is specific to chainquery.
|
||||||
|
#
|
||||||
## Ensure perms are correct prior to running main binary
|
# ## Ensure perms are correct prior to running main binary
|
||||||
chown -R 1000:1000 /data
|
# chown -R 1000:1000 /data
|
||||||
chmod -R 755 /data
|
# chmod -R 755 /data
|
||||||
chown -R 1000:1000 /etc/lbrycrdd
|
# chown -R 1000:1000 /etc/lbrycrdd
|
||||||
chmod -R 755 /etc/lbrycrdd
|
# chmod -R 755 /etc/lbrycrdd
|
||||||
rm -f /var/run/lbrycrdd.pid
|
# rm -f /var/run/lbrycrdd.pid
|
||||||
|
#
|
||||||
## For now keeping this simple. Potentially eventually add all command args as envvars for the Dockerfile or use safe way to add args via docker-compose.yml
|
# ## For now keeping this simple. Potentially eventually add all command args as envvars for the Dockerfile or use safe way to add args via docker-compose.yml
|
||||||
## Command to initialize
|
# ## Command to initialize
|
||||||
|
# # lbrycrdd \
|
||||||
|
# # -conf=${CONF_PATH:-/etc/lbrycrdd/lbrycrdd.conf} \
|
||||||
|
# # -data=${DATA_DIR:-/data/} \
|
||||||
|
# # -port=${PORT:-9246} \
|
||||||
|
# # -pid=${PID_FILE:/var/run/lbrycrdd.pid} \
|
||||||
|
# # -printtoconsole \
|
||||||
|
# # -rpcport=${RPC_PORT:-9245} \
|
||||||
|
# # -rpcpassword=${RPC_PASSWORD:-changeme} \
|
||||||
|
# # -rpcuser=${RPC_USER:-lbryrpc} \
|
||||||
|
# # -rpcallowip=${RPC_ALLOW_IP:-10.10.0.2} \
|
||||||
|
# # -reindex \
|
||||||
|
# # -txindex
|
||||||
|
#
|
||||||
|
# ## Command to run for long term.
|
||||||
# lbrycrdd \
|
# lbrycrdd \
|
||||||
# -conf=${CONF_PATH:-/etc/lbrycrdd/lbrycrdd.conf} \
|
# -conf=${CONF_PATH:-/etc/lbrycrdd/lbrycrdd.conf} \
|
||||||
# -data=${DATA_DIR:-/data/} \
|
# -data=${DATA_DIR:-/data/} \
|
||||||
|
@ -25,18 +39,35 @@ rm -f /var/run/lbrycrdd.pid
|
||||||
# -rpcpassword=${RPC_PASSWORD:-changeme} \
|
# -rpcpassword=${RPC_PASSWORD:-changeme} \
|
||||||
# -rpcuser=${RPC_USER:-lbryrpc} \
|
# -rpcuser=${RPC_USER:-lbryrpc} \
|
||||||
# -rpcallowip=${RPC_ALLOW_IP:-10.10.0.2} \
|
# -rpcallowip=${RPC_ALLOW_IP:-10.10.0.2} \
|
||||||
# -reindex \
|
|
||||||
# -txindex
|
# -txindex
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
## Command to run for long term.
|
## Ensure perms are correct prior to running main binary
|
||||||
|
chown -R 1000:1000 /data
|
||||||
|
chmod -R 755 /data
|
||||||
|
chown -R 1000:1000 /etc/lbrycrdd
|
||||||
|
chmod -R 755 /etc/lbrycrdd
|
||||||
|
rm -f /var/run/lbrycrdd.pid
|
||||||
|
mkdir -p ~/.lbrycrd
|
||||||
|
|
||||||
|
## Set config params
|
||||||
|
echo -e "rpcuser=lbryrpc\nrpcpassword=${RPC_PASSWORD:-changeme}" > ~/.lbrycrd/lbrycrd.conf
|
||||||
|
echo -e "rpcallowip=${RPC_ALLOW_IP:-10.10.0.2}" >> ~/.lbrycrd/lbrycrd.conf
|
||||||
|
echo -e "rpcuser=${RPC_USER:-lbryrpc}" >> ~/.lbrycrd/lbrycrd.conf
|
||||||
|
|
||||||
|
## For now keeping this simple. Potentially eventually add all command args as envvars for the Dockerfile or use safe way to add args via docker-compose.yml
|
||||||
lbrycrdd \
|
lbrycrdd \
|
||||||
-conf=${CONF_PATH:-/etc/lbrycrdd/lbrycrdd.conf} \
|
-server \
|
||||||
-data=${DATA_DIR:-/data/} \
|
-txindex \
|
||||||
-port=${PORT:-9246} \
|
-reindex \
|
||||||
-pid=${PID_FILE:/var/run/lbrycrdd.pid} \
|
-conf=$HOME/.lbrycrd/lbrycrd.conf \
|
||||||
-printtoconsole \
|
-printtoconsole
|
||||||
-rpcport=${RPC_PORT:-9245} \
|
|
||||||
-rpcpassword=${RPC_PASSWORD:-changeme} \
|
## We were unsure if these function as intended so they were disabled for the time being.
|
||||||
-rpcuser=${RPC_USER:-lbryrpc} \
|
# -port=${PORT:-9246} \
|
||||||
-rpcallowip=${RPC_ALLOW_IP:-10.10.0.2} \
|
# -data=${DATA_DIR:-/data/} \
|
||||||
-txindex
|
# -pid=${PID_FILE:/var/run/lbrycrdd.pid} \
|
||||||
|
# -rpcport=${RPC_PORT:-9245} \
|
||||||
|
# -rpcpassword=${RPC_PASSWORD:-changeme} \
|
||||||
|
# -rpcuser=${RPC_USER:-lbryrpc} \
|
||||||
|
# -rpcallowip=${RPC_ALLOW_IP:-10.10.0.2}
|
||||||
|
|
Loading…
Reference in a new issue