2018-10-14 14:30:06 +02:00
#!/usr/bin/env bash
2018-10-03 19:39:28 +02:00
2018-11-06 22:26:54 +01:00
# TODO: Remove this notes section.
## Keeping this here as notes for later sed magic.
# #########################
# ## Chainquery Settings ##
# #########################
# RPC_USER=lbryrpc ## Not super necessery to change this.
# RPC_PASSWORD=changeme ## Please replace changeme.
2018-11-29 20:07:39 +01:00
# RPC_ALLOW_IP=10.6.1.3 ## You're better off not changing this.
2018-11-06 22:26:54 +01:00
#
# #################
# ## Mysql Creds ##
# #################
2018-11-29 20:07:39 +01:00
# MYSQL_SERVER=10.6.1.10 ## You're better off not changing this.
2018-11-06 22:26:54 +01:00
# MYSQL_USER=changeme ## This could be changed.
# MYSQL_PASSWORD=changeme ## This could be set to something random it sets this string for both Mysql's main user and Chainquery's MysqlDSN.
# MYSQL_DATABASE=chainquery ## This can stay the same.
# MYSQL_ROOT_PASSWORD=changeme ## Set this to something random and obnoxious we're not using it.
2018-11-05 04:42:35 +01:00
2018-11-06 22:26:54 +01:00
# TODO: Add chainquery startup magic for configuration.
# sed -i ''
#
#
# debugmode=${DEBUGMODE:-false}
2018-11-29 20:07:39 +01:00
# lbrycrdurl="rpc://${RPC_USER:-lbryrpc}:${RPC_PASSWORD:-changeme}@10.6.1.2:9245"
# mysqldsn="${MYSQL_USER:-changeme}:${MYSQL_PASSWORD:-changeme}@tcp(${MYSQL_SERVER:-10.6.1.10}:3306)/${MYSQL_DATABASE:-chainquery}"
# apimysqldsn="${MYSQL_USER:-changeme}:${MYSQL_PASSWORD:-changeme}@tcp(${MYSQL_SERVER:-10.6.1.10}:3306)/${MYSQL_DATABASE:-chainquery}"
2018-11-05 04:42:35 +01:00
2018-10-03 19:39:28 +02:00
## 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
2018-11-05 04:42:35 +01:00
chainquery serve -c "/etc/chainquery/"