Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions chainquery/compose/docker-compose.yml-prod-example
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ services:
- ../persist/chainquery/db:/var/lib/mysql
## This one may need to be tweaked based on where you run this docker-compose from.
- ../stuff/my.cnf:/etc/mysql/conf.d/chainquery-optimizations.cnf
- socket:/var/run/mysqld/mysqld.sock

################
## Chainquery ##
Expand All @@ -54,3 +55,10 @@ services:
## TODO: Uncomment this in a docker-compose.override.yml to allow for external configurations.
volumes:
- ../persist/chainquery/config/chainqueryconfig.toml:/etc/chainquery/chainqueryconfig.toml
- socket:/var/run/mysqld/mysqld.sock

#############
## Volumes ##
#############
volumes:
socket:
3 changes: 3 additions & 0 deletions chainquery/stuff/my.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ innodb_flush_log_at_trx_commit = 0
innodb_autoinc_lock_mode=2
innodb_buffer_pool_size=1G
innodb_log_buffer_size=1G
## /var/run/mysqld/mysqld.sock
## mysqldsn="lbry:PASSWORD@unix(/var/run/mysqld/mysqld.sock)/chainquery"
socket=/var/run/mysqld/mysqld.sock
6 changes: 5 additions & 1 deletion chainquery/stuff/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
## Setup Values
DEBUGMODE=$(echo "debugmode=$DEBUGMODE")
LBRYCRDURL=$(echo "lbrycrdurl=\"rpc://$RPC_USER:$RPC_PASSWORD@10.5.1.2:9245\"")
MYSQLDSN=$(echo "mysqldsn=\"$MYSQL_USER:$MYSQL_PASSWORD@tcp($MYSQL_SERVER:3306)/$MYSQL_DATABASE\"")

## TODO: Add a switching mechanism here.
## MYSQLDSN=$(echo "mysqldsn=\"$MYSQL_USER:$MYSQL_PASSWORD@tcp($MYSQL_SERVER:3306)/$MYSQL_DATABASE\"")
MYSQLDSN=$(echo "mysqldsn=\"$MYSQL_USER:$MYSQL_PASSWORD@unix(/var/run/mysqld/mysqld.sock)/$MYSQL_DATABASE\"")

APIMYSQLDSN=$(echo "apimysqldsn=\"$MYSQL_USER:$MYSQL_PASSWORD@tcp($MYSQL_SERVER:3306)/$MYSQL_DATABASE\"")

## Setup Defaults
Expand Down