Skip to content

Commit

Permalink
Add build images and configuration files
Browse files Browse the repository at this point in the history
This commit adds the docker-compose.yml file to build the environment
required to run the tests and the proxysql.cnf file to configure the
ProxySQL instance.
  • Loading branch information
altmannmarcelo committed Aug 13, 2024
1 parent bc50868 commit 890d312
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
29 changes: 29 additions & 0 deletions build/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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"
readyset:
image: readysettech/readyset
container_name: readyset
environment:
- UPSTREAM_DB_URL=mysql://root:noria@mysql-master:3306/noria
- LISTEN_ADDRESS=0.0.0.0:3307
ports:
- "3307:3307"
- "6034:6034"
depends_on:
- mysql-master
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:
(
{
username = "root"
password = "noria"
default_hostgroup = 1
max_connections=1000
default_schema="noria"
active = 1
}
)

0 comments on commit 890d312

Please sign in to comment.