Allow env variable to override RPC port

This commit is contained in:
Dan Garthwaite 2019-10-10 09:28:28 -04:00 committed by Leopere
parent b837de83cc
commit 84b39abeb1

View file

@ -6,7 +6,9 @@ DEBUGMODE="${DEBUGMODE:-false}"
RPC_USER="${RPC_USER:-lbry}"
RPC_PASSWORD="${RPC_PASSWORD:-lbry}"
RPC_HOST="${RPC_HOST:-localhost}"
RPC_PORT="${RPC_PORT:-9245}"
MYSQL_SERVER="${MYSQL_SERVER:-localhost}"
MYSQL_PORT="${MYSQL_PORT:-3306}"
MYSQL_USER="${MYSQL_USER:-lbry}"
MYSQL_PASSWORD="${MYSQL_PASSWORD:-lbry}"
MYSQL_DATABASE="${MYSQL_DATABASE:-chainquery}"
@ -23,8 +25,8 @@ fi
cat << EOF >> "${CONFIGFILE}"
DEBUGMODE="${DEBUGMODE}"
LBRYCRDURL="rpc://${RPC_USER}:${RPC_PASSWORD}@${RPC_HOST}:9245"
MYSQLDSN="${MYSQL_USER}:${MYSQL_PASSWORD}@tcp(${MYSQL_SERVER}:3306)/$MYSQL_DATABASE"
APIMYSQLDSN="${MYSQL_USER}:${MYSQL_PASSWORD}@tcp(${MYSQL_SERVER}:3306)/$MYSQL_DATABASE"
LBRYCRDURL="rpc://${RPC_USER}:${RPC_PASSWORD}@${RPC_HOST}:${RPC_PORT}"
MYSQLDSN="${MYSQL_USER}:${MYSQL_PASSWORD}@tcp(${MYSQL_SERVER}:${MYSQL_PORT})/$MYSQL_DATABASE"
APIMYSQLDSN="${MYSQL_USER}:${MYSQL_PASSWORD}@tcp(${MYSQL_SERVER}:${MYSQL_PORT})/$MYSQL_DATABASE"
EOF
exec_chainquery