Skip to content

Commit

Permalink
Use non ephemeral ports
Browse files Browse the repository at this point in the history
  • Loading branch information
driv3r committed Oct 11, 2023
1 parent 3a3bb01 commit 9e2dc1f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ up:
meet: ":"
- custom:
name: Podman compose
met?: podman-compose ls | grep -ioE -q "lhm.*running\(4\)"
met?: podman-compose ps | grep -ioE -q "lhm.*running\(4\)"
meet: podman-compose up -d
- custom:
name: Waiting for DBs to be operational
Expand Down
6 changes: 3 additions & 3 deletions docker-compose-mysql-8.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
MYSQL_ROOT_PASSWORD: password
MYSQL_HOST: mysql-1
ports:
- "33006:3306"
- "13006:3306"
# Reader
mysql-2:
container_name: mysql-2
Expand All @@ -42,7 +42,7 @@ services:
MYSQL_ROOT_PASSWORD: password
MYSQL_HOST: mysql-2
ports:
- "33007:3306"
- "13007:3306"
# Proxysql
proxysql:
container_name: proxysql
Expand All @@ -52,7 +52,7 @@ services:
- ./scripts/proxysql/proxysql.cnf:/etc/proxysql.cnf
command: "proxysql -c /etc/proxysql.cnf -f --idle-threads"
ports:
- "33005:3306"
- "13005:3306"
- "6032:6032"
toxiproxy:
container_name: toxiproxy
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
MYSQL_ROOT_PASSWORD: password
MYSQL_HOST: mysql-1
ports:
- "33006:3306"
- "13006:3306"
# Reader
mysql-2:
container_name: mysql-2
Expand All @@ -40,7 +40,7 @@ services:
MYSQL_ROOT_PASSWORD: password
MYSQL_HOST: mysql-2
ports:
- "33007:3306"
- "13007:3306"
# Proxysql
proxysql:
container_name: proxysql
Expand All @@ -49,7 +49,7 @@ services:
- ./scripts/proxysql/proxysql.cnf:/etc/proxysql.cnf
command: "proxysql -c /etc/proxysql.cnf -f --idle-threads"
ports:
- "33005:3306"
- "13005:3306"
- "6032:6032"
toxiproxy:
container_name: toxiproxy
Expand Down
6 changes: 3 additions & 3 deletions scripts/helpers/wait-for-dbs.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/bin/bash
# Wait for writer
echo "Waiting for MySQL-1: "
while ! (mysqladmin ping --host="127.0.0.1" --port=33006 --user=root --password=password --silent 2> /dev/null); do
while ! (mysqladmin ping --host="127.0.0.1" --port=13006 --user=root --password=password --silent 2> /dev/null); do
echo -ne "."
sleep 1
done
# Wait for reader
echo "Waiting for MySQL-2: "
while ! (mysqladmin ping --host="127.0.0.1" --port=33007 --user=root --password=password --silent 2> /dev/null); do
while ! (mysqladmin ping --host="127.0.0.1" --port=13007 --user=root --password=password --silent 2> /dev/null); do
echo -ne "."
sleep 1
done
# Wait for proxysql
echo "Waiting for ProxySQL:"
while ! (mysqladmin ping --host="127.0.0.1" --port=33005 --user=root --password=password --silent 2> /dev/null); do
while ! (mysqladmin ping --host="127.0.0.1" --port=13005 --user=root --password=password --silent 2> /dev/null); do
echo -ne "."
sleep 1
done
Expand Down
6 changes: 3 additions & 3 deletions spec/integration/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ master:
host: mysql-1
user: root
password: password
port: 33006
port: 13006
replica:
host: mysql-2
user: root
password: password
port: 33007
port: 13007
proxysql:
host: proxysql
user: root
password: password
port: 33005
port: 13005
master_toxic:
host: toxiproxy
user: root
Expand Down

0 comments on commit 9e2dc1f

Please sign in to comment.