-
Notifications
You must be signed in to change notification settings - Fork 3
/
mariadb.stack.yml
40 lines (37 loc) · 1.27 KB
/
mariadb.stack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
version: "3.9"
services:
mariadb-server-1:
container_name: mariadb-server-1
image: alejandrodu/mariadb
environment:
- MARIADB_CREATE_DATABASE=demo
- MARIADB_CREATE_USER=user:Password123!
- MARIADB_CREATE_REPLICATION_USER=replication_user:ReplicationPassword123!
- MARIADB_CREATE_MAXSCALE_USER=maxscale_user:MaxScalePassword123!
restart: unless-stopped
mariadb-server-2:
container_name: mariadb-server-2
image: alejandrodu/mariadb
environment:
- MARIADB_REPLICATE_FROM=replication_user:ReplicationPassword123!@mariadb-server-1:3306
restart: unless-stopped
mariadb-server-3:
container_name: mariadb-server-3
image: alejandrodu/mariadb
environment:
- MARIADB_REPLICATE_FROM=replication_user:ReplicationPassword123!@mariadb-server-1:3306
restart: unless-stopped
maxscale:
container_name: maxscale
image: alejandrodu/mariadb-maxscale
command: --admin_host 0.0.0.0 --admin_secure_gui false
ports:
- "3306:4000"
- "8989:8989"
- "27017:27017"
environment:
- MAXSCALE_USER=maxscale_user:MaxScalePassword123!
- MARIADB_HOST_1=mariadb-server-1 3306
- MARIADB_HOST_2=mariadb-server-2 3306
- MARIADB_HOST_3=mariadb-server-3 3306
restart: unless-stopped