Fix up ports for chainquery to talk to lbrycrd

This commit is contained in:
Dan Garthwaite 2019-10-09 21:43:30 -04:00 committed by Leopere
parent ec3e9457b3
commit fd9ef0ebef
2 changed files with 16 additions and 13 deletions

View file

@ -8,16 +8,13 @@ services:
########### ###########
## MYSQL ## ## MYSQL ##
########### ###########
## MariaDB is currently not supported and neither is later versions of MySQL this may change. ## Work is underway to support percona
## https://hub.docker.com/r/_/mariadb/
mysql: mysql:
image: mysql:5.7.23 image: mysql:5.7.23
restart: always restart: always
networks: networks:
lbry-network: lbry-network:
ipv4_address: 10.6.1.10 ipv4_address: 10.6.1.10
aliases:
- mysql
env_file: env_file:
- ../environment/chainquery.env - ../environment/chainquery.env
expose: expose:
@ -26,6 +23,10 @@ services:
## and not share it with everyone at least eventually. ## and not share it with everyone at least eventually.
ports: ports:
- 3306:3306 - 3306:3306
healthcheck:
test: ["CMD-SHELL", 'mysql --database=$$MYSQL_DATABASE --password=$$MYSQL_ROOT_PASSWORD --execute="SELECT count(table_name) > 0 FROM information_schema.tables;" --skip-column-names -B']
interval: 5s
retries: 12
volumes: volumes:
- ../persist/chainquery/db:/var/lib/mysql - ../persist/chainquery/db:/var/lib/mysql
## This one may need to be tweaked based on where you run this docker-compose from. ## This one may need to be tweaked based on where you run this docker-compose from.
@ -35,14 +36,16 @@ services:
## Chainquery ## ## Chainquery ##
################ ################
chainquery: chainquery:
image: lbryio/lbry-docker:linux-x86_64-production build:
context: .
dockerfile: Dockerfile-linux-x86_64-production
restart: always restart: always
networks: networks:
lbry-network: lbry-network:
ipv4_address: 10.6.1.3 ipv4_address: 10.6.1.3
env_file: env_file:
- env - env
- ../environment/lbrycrd.env - ../environment/chainquery.env
labels: labels:
- "traefik.expose=false" - "traefik.expose=false"
expose: expose:
@ -52,5 +55,5 @@ services:
depends_on: depends_on:
- mysql - mysql
## TODO: Uncomment this in a docker-compose.override.yml to allow for external configurations. ## TODO: Uncomment this in a docker-compose.override.yml to allow for external configurations.
volumes: #volumes:
- ../persist/chainquery/config/chainqueryconfig.toml:/etc/chainquery/chainqueryconfig.toml # - ../persist/chainquery/config/chainqueryconfig.toml:/etc/chainquery/chainqueryconfig.toml

View file

@ -3,14 +3,14 @@
######################### #########################
## Chainquery Settings ## ## Chainquery Settings ##
######################### #########################
RPC_ALLOW_IP=10.5.1.3 RPC_ALLOW_IP=10.6.1.3
DEBUGMODE=false DEBUGMODE=false
################# #################
## Mysql Creds ## ## Mysql Creds ##
################# #################
MYSQL_SERVER=10.5.1.10 MYSQL_SERVER=10.6.1.10
MYSQL_USER=chainquery MYSQL_USER=lbry
MYSQL_PASSWORD=changeme MYSQL_PASSWORD=lbry
MYSQL_DATABASE=chainquery MYSQL_DATABASE=chainquery
MYSQL_ROOT_PASSWORD=changeme MYSQL_ROOT_PASSWORD=lbry