Skip to content

Commit 68ddd9f

Browse files
committed
Set container names
1 parent 0fb797a commit 68ddd9f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Access the application in your browser at http://localhost:8080. Insert and upda
8181
Stop the primary node:
8282

8383
```shell
84-
docker stop read-write-split-java-app-server-1-1
84+
docker stop server-1
8585
```
8686

8787
> **Note:** Remember to configure MaxScale for automatic failover and rejoin!
@@ -93,7 +93,7 @@ If you start the stopped container, it should rejoin the cluster as a replica.
9393
To start it:
9494

9595
```shell
96-
docker start read-write-split-java-app-server-1-1
96+
docker start server-1
9797
```
9898

9999
To shutdown the database cluster run:

docker-compose.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version: "3.9"
22
services:
33
server-1:
44
image: alejandrodu/mariadb
5+
container_name: server-1
56
environment:
67
- MARIADB_CREATE_DATABASE=demo
78
- MARIADB_CREATE_USER=user:Password123!
@@ -10,16 +11,19 @@ services:
1011

1112
server-2:
1213
image: alejandrodu/mariadb
14+
container_name: server-2
1315
environment:
1416
- MARIADB_REPLICATE_FROM=replication_user:ReplicationPassword123!@server-1:3306
1517

1618
server-3:
1719
image: alejandrodu/mariadb
20+
container_name: server-3
1821
environment:
1922
- MARIADB_REPLICATE_FROM=replication_user:ReplicationPassword123!@server-1:3306
2023

2124
maxscale:
2225
image: alejandrodu/mariadb-maxscale
26+
container_name: maxscale
2327
command: --admin_host 0.0.0.0 --admin_secure_gui false
2428
ports:
2529
- "8989:8989"

0 commit comments

Comments
 (0)