Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host list #19

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ target/

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

.vscode/
36 changes: 36 additions & 0 deletions build/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: "3.8"
services:
proxysql:
image: proxysql/proxysql
ports:
- "6033:6033"
- "6032:6032"
volumes:
- ./proxysql.cnf:/etc/proxysql.cnf
mysql-master:
image: mysql:8.0
container_name: mysql-master
environment:
- MYSQL_ROOT_PASSWORD=noria
- MYSQL_DATABASE=noria
command: --server-id=1
ports:
- "3306:3306"
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -u root -pnoria"]
interval: 10s
retries: 20
start_period: 30s
timeout: 10s
readyset:
image: readysettech/readyset
ports:
- "3307:3307"
- "6034:6034"
environment:
- UPSTREAM_DB_URL=mysql://root:[email protected]:3306/noria
depends_on:
mysql-master:
condition: service_healthy
restart: true

30 changes: 30 additions & 0 deletions build/proxysql.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
admin_variables=
{
admin_credentials="admin:admin;radmin:radmin"
}

# defines all the MySQL servers
mysql_servers =
(
{ address="host.docker.internal" , port=3306 , hostgroup=1, comment="Source" },
{ address="host.docker.internal" , port=3307 , hostgroup=2, weight=1000, comment="Readyset" },
{ address="host.docker.internal" , port=3306 , hostgroup=2, weight=1, comment="Source" }
)

mysql_variables=
{
monitor_username="root"
monitor_password="noria"
}

mysql_users:
altmannmarcelo marked this conversation as resolved.
Show resolved Hide resolved
(
{
username = "root"
password = "noria"
default_hostgroup = 1
max_connections=1000
default_schema="noria"
active = 1
}
)