Adjusted networking to not collide in my dev env

This commit is contained in:
Leopere 2018-11-29 19:07:39 +00:00
parent c33d806013
commit f262867d77
10 changed files with 20 additions and 20 deletions

View file

@ -46,7 +46,7 @@ You only need external networking if you plan on keeping your docker-compose fil
For the sake of modularity in the design of this git repository the plan is to give you examples to try and then you're supposed to move towards your own custom docker-compose configuration. We're going to create For the sake of modularity in the design of this git repository the plan is to give you examples to try and then you're supposed to move towards your own custom docker-compose configuration. We're going to create
a docker bridge network that is going to be managed externally to your usual docker-compose networks which are compose internal. a docker bridge network that is going to be managed externally to your usual docker-compose networks which are compose internal.
`docker network create -d bridge --subnet=10.5.1.0/16 lbrynet` `docker network create -d bridge --subnet=10.6.1.0/16 lbrynet`
## Make directories and set permissions ## Make directories and set permissions

View file

@ -15,7 +15,7 @@ services:
restart: always restart: always
networks: networks:
lbrynet: lbrynet:
ipv4_address: 10.5.1.10 ipv4_address: 10.6.1.10
aliases: aliases:
- mysql - mysql
env_file: env_file:
@ -40,7 +40,7 @@ services:
restart: always restart: always
networks: networks:
lbrynet: lbrynet:
ipv4_address: 10.5.1.3 ipv4_address: 10.6.1.3
env_file: env_file:
- .env - .env
- ../lbrycrd/.env - ../lbrycrd/.env

View file

@ -4,13 +4,13 @@
debugmode=false debugmode=false
#LBRYcrd URL is required for chainquery to query the blockchain #LBRYcrd URL is required for chainquery to query the blockchain
lbrycrdurl="rpc://lbryrpc:changeme@10.5.1.2:9245" lbrycrdurl="rpc://lbryrpc:changeme@10.6.1.2:9245"
#MySQL DSN is required for chainquery to store information. #MySQL DSN is required for chainquery to store information.
mysqldsn="changeme:changeme@tcp(10.5.1.10:3306)/chainquery" mysqldsn="changeme:changeme@tcp(10.6.1.10:3306)/chainquery"
#API MySQL DSN is required for chainquery to expose a SQL query service #API MySQL DSN is required for chainquery to expose a SQL query service
apimysqldsn="changeme:changeme@tcp(10.5.1.10:3306)/chainquery" 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` #The command that should be executed to trigger a self update of the software. For linux, for example, `<yourscript>.sh`
#DEFAULT-autoupdatecommand=[unset] #DEFAULT-autoupdatecommand=[unset]

View file

@ -7,12 +7,12 @@ COMPOSE_PROJECT_NAME=chainquery
#RPC_USER=lbryrpc ## Not super necessery to change this. #RPC_USER=lbryrpc ## Not super necessery to change this.
#RPC_PASSWORD=changeme ## Please replace changeme. #RPC_PASSWORD=changeme ## Please replace changeme.
RPC_ALLOW_IP=10.5.1.3 ## You're better off not changing this. RPC_ALLOW_IP=10.6.1.3 ## You're better off not changing this.
################# #################
## Mysql Creds ## ## Mysql Creds ##
################# #################
MYSQL_SERVER=10.5.1.10 ## You're better off not changing this. MYSQL_SERVER=10.6.1.10 ## You're better off not changing this.
MYSQL_USER=changeme ## This could be changed. 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_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_DATABASE=chainquery ## This can stay the same.

View file

@ -7,12 +7,12 @@
# ######################### # #########################
# RPC_USER=lbryrpc ## Not super necessery to change this. # RPC_USER=lbryrpc ## Not super necessery to change this.
# RPC_PASSWORD=changeme ## Please replace changeme. # RPC_PASSWORD=changeme ## Please replace changeme.
# RPC_ALLOW_IP=10.5.1.3 ## You're better off not changing this. # RPC_ALLOW_IP=10.6.1.3 ## You're better off not changing this.
# #
# ################# # #################
# ## Mysql Creds ## # ## Mysql Creds ##
# ################# # #################
# MYSQL_SERVER=10.5.1.10 ## You're better off not changing this. # MYSQL_SERVER=10.6.1.10 ## You're better off not changing this.
# MYSQL_USER=changeme ## This could be changed. # 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_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_DATABASE=chainquery ## This can stay the same.
@ -23,9 +23,9 @@
# #
# #
# debugmode=${DEBUGMODE:-false} # debugmode=${DEBUGMODE:-false}
# lbrycrdurl="rpc://${RPC_USER:-lbryrpc}:${RPC_PASSWORD:-changeme}@10.5.1.2:9245" # lbrycrdurl="rpc://${RPC_USER:-lbryrpc}:${RPC_PASSWORD:-changeme}@10.6.1.2:9245"
# mysqldsn="${MYSQL_USER:-changeme}:${MYSQL_PASSWORD:-changeme}@tcp(${MYSQL_SERVER:-10.5.1.10}:3306)/${MYSQL_DATABASE:-chainquery}" # 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.5.1.10}:3306)/${MYSQL_DATABASE:-chainquery}" # apimysqldsn="${MYSQL_USER:-changeme}:${MYSQL_PASSWORD:-changeme}@tcp(${MYSQL_SERVER:-10.6.1.10}:3306)/${MYSQL_DATABASE:-chainquery}"
## 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
chainquery serve -c "/etc/chainquery/" chainquery serve -c "/etc/chainquery/"

View file

@ -17,7 +17,7 @@ rm -f /var/run/lbrycrdd.pid
## Set config params ## Set config params
echo 'rpcuser=lbryrpc\nrpcpassword='${RPC_PASSWORD:-changeme} > ~/.lbrycrd/lbrycrd.conf echo 'rpcuser=lbryrpc\nrpcpassword='${RPC_PASSWORD:-changeme} > ~/.lbrycrd/lbrycrd.conf
echo "rpcallowip=${RPC_ALLOW_IP:-10.5.1.3}" >> ~/.lbrycrd/lbrycrd.conf echo "rpcallowip=${RPC_ALLOW_IP:-10.6.1.3}" >> ~/.lbrycrd/lbrycrd.conf
echo "rpcuser=${RPC_USER:-lbryrpc}" >> ~/.lbrycrd/lbrycrd.conf echo "rpcuser=${RPC_USER:-lbryrpc}" >> ~/.lbrycrd/lbrycrd.conf
## Control this invocation through envvar. ## Control this invocation through envvar.
@ -53,4 +53,4 @@ esac
# -rpcport=${RPC_PORT:-9245} \ # -rpcport=${RPC_PORT:-9245} \
# -rpcpassword=${RPC_PASSWORD:-changeme} \ # -rpcpassword=${RPC_PASSWORD:-changeme} \
# -rpcuser=${RPC_USER:-lbryrpc} \ # -rpcuser=${RPC_USER:-lbryrpc} \
# -rpcallowip=${RPC_ALLOW_IP:-10.5.1.3} # -rpcallowip=${RPC_ALLOW_IP:-10.6.1.3}

View file

@ -13,7 +13,7 @@ services:
restart: always restart: always
networks: networks:
lbrynet: lbrynet:
ipv4_address: 10.5.1.2 ipv4_address: 10.6.1.2
labels: labels:
- "traefik.expose=false" - "traefik.expose=false"
environment: environment:

View file

@ -9,4 +9,4 @@ RPC_PASSWORD=${RPC_PASSWORD:-changeme}
## This should be the internal container IP from which you'll be calling the RPC for Lbrycrdd from. ## This should be the internal container IP from which you'll be calling the RPC for Lbrycrdd from.
## TODO: make this more dynamic before we move to scalability ## TODO: make this more dynamic before we move to scalability
RPC_ALLOW_IP=${RPC_ALLOW_IP:-10.5.1.3} RPC_ALLOW_IP=${RPC_ALLOW_IP:-10.6.1.3}

View file

@ -20,7 +20,7 @@ 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:-changeme}" > /data/.lbrycrd/lbrycrd.conf echo "rpcuser=lbryrpc\nrpcpassword=${RPC_PASSWORD:-changeme}" > /data/.lbrycrd/lbrycrd.conf
echo "rpcallowip=${RPC_ALLOW_IP:-10.5.1.3}" >> /data/.lbrycrd/lbrycrd.conf echo "rpcallowip=${RPC_ALLOW_IP:-10.6.1.3}" >> /data/.lbrycrd/lbrycrd.conf
echo "rpcuser=${RPC_USER:-lbryrpc}" >> /data/.lbrycrd/lbrycrd.conf echo "rpcuser=${RPC_USER:-lbryrpc}" >> /data/.lbrycrd/lbrycrd.conf
## Control this invocation through envvar. ## Control this invocation through envvar.
@ -44,4 +44,4 @@ esac
# -rpcport=${RPC_PORT:-9245} \ # -rpcport=${RPC_PORT:-9245} \
# -rpcpassword=${RPC_PASSWORD:-changeme} \ # -rpcpassword=${RPC_PASSWORD:-changeme} \
# -rpcuser=${RPC_USER:-lbryrpc} \ # -rpcuser=${RPC_USER:-lbryrpc} \
# -rpcallowip=${RPC_ALLOW_IP:-10.5.1.3} # -rpcallowip=${RPC_ALLOW_IP:-10.6.1.3}

View file

@ -1,2 +1,2 @@
#!/usr/bin/env bash #!/usr/bin/env bash
docker network create -d bridge --subnet=10.5.1.0/16 lbrynet docker network create -d bridge --subnet=10.6.1.0/16 lbrynet