work from Lenny and Beamer for Chainquery/Lbrycrd

This commit is contained in:
root on chainquery dev 2018-12-13 04:15:59 +00:00 committed by Mark Beamer Jr
parent 81b9613208
commit c30c2d3840
No known key found for this signature in database
GPG key ID: 1C314FB89AD76973
7 changed files with 17 additions and 23 deletions

5
.gitignore vendored
View file

@ -1,4 +1,7 @@
.gitlab-ci.yml
.DS_Store
*/docker-compose.override.yml */docker-compose.override.yml
docker-compose.yml docker-compose.yml
*/data/ */data/
./docker-compose.yml
*.zip

View file

@ -1,4 +1,5 @@
data/ data/
data.z* data.z*
chainquery.z* chainquery.z*
*.zip
compile/ compile/

View file

@ -10,7 +10,7 @@ DEBUGMODE=false
## Mysql Creds ## ## Mysql Creds ##
################# #################
MYSQL_SERVER=10.5.1.10 MYSQL_SERVER=10.5.1.10
MYSQL_USER=chainquery MYSQL_USER=root
MYSQL_PASSWORD=changeme MYSQL_PASSWORD=changeme
MYSQL_DATABASE=chainquery MYSQL_DATABASE=chainquery
MYSQL_ROOT_PASSWORD=changeme MYSQL_ROOT_PASSWORD=changeme

View file

@ -1,3 +1,4 @@
data/ data/
data.z* data.z*
chainquery.z* chainquery.z*
*.zip

View file

@ -1,16 +0,0 @@
## TODO: Don't hardcode this stuff for production
#Debug mode outputs specific information to the console
debugmode=false
#LBRYcrd URL is required for chainquery to query the blockchain
lbrycrdurl="rpc://lbryrpc:changeme@10.6.1.2:9245"
#MySQL DSN is required for chainquery to store information.
mysqldsn="changeme:changeme@tcp(10.6.1.10:3306)/chainquery"
#API MySQL DSN is required for chainquery to expose a SQL query service
apimysqldsn="changeme:changeme@tcp(10.6.1.10:3306)/chainquery"
#The command that should be executed to trigger a self update of the software. For linux, for example, `<yourscript>.sh`
#DEFAULT-autoupdatecommand=[unset]

View file

@ -18,6 +18,8 @@ services:
- "traefik.expose=false" - "traefik.expose=false"
environment: environment:
RUN_MODE: chainquery RUN_MODE: chainquery
env_file:
- .env
expose: expose:
- 9245 - 9245
- 9246 - 9246

View file

@ -19,19 +19,22 @@ rm -f /var/run/lbrycrd.pid
## Set config params ## Set config params
## TODO: Make this more automagic in the future. ## TODO: Make this more automagic in the future.
echo "rpcuser=lbryrpc\nrpcpassword=$RPC_PASSWORD" > /data/.lbrycrd/lbrycrd.conf echo "rpcuser=$RPC_USER" > /data/.lbrycrd/lbrycrd.conf
echo "rpcpassword=$RPC_PASSWORD" >> /data/.lbrycrd/lbrycrd.conf
echo "rpcallowip=$RPC_ALLOW_IP" >> /data/.lbrycrd/lbrycrd.conf echo "rpcallowip=$RPC_ALLOW_IP" >> /data/.lbrycrd/lbrycrd.conf
echo "rpcuser=$RPC_USER" >> /data/.lbrycrd/lbrycrd.conf echo "rpcport=9245" >> /data/.lbrycrd/lbrycrd.conf
echo "rpcbind=0.0.0.0" >> /data/.lbrycrd/lbrycrd.conf
#echo "bind=0.0.0.0" >> /data/.lbrycrd/lbrycrd.conf
## Control this invocation through envvar. ## Control this invocation through envvar.
case $RUN_MODE in case $RUN_MODE in
default ) default )
su -c "lbrycrdd -server -conf=/data/.lbrycrd/ -printtoconsole" lbrycrd su -c "lbrycrdd -server -conf=/data/.lbrycrd/lbrycrd.conf -printtoconsole" lbrycrd
;; ;;
reindex ) reindex )
su -c "lbrycrdd -server -txindex -reindex -conf=/data/.lbrycrd/ -printtoconsole" lbrycrd su -c "lbrycrdd -server -txindex -reindex -conf=/data/.lbrycrd/lbrycrd.conf -printtoconsole" lbrycrd
;; ;;
chainquery ) chainquery )
su -c "lbrycrdd -server -txindex -conf=/data/.lbrycrd/ -printtoconsole" lbrycrd su -c "lbrycrdd -server -txindex -conf=/data/.lbrycrd/lbrycrd.conf -printtoconsole" lbrycrd
;; ;;
esac esac