-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
41 lines (39 loc) · 1.14 KB
/
docker-compose.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
41
version: '2.1'
services:
mariadb-master:
image: 'bitnami/mariadb:10.6'
ports:
- '3306'
volumes:
- /opt/mariadb/master-data:/bitnami/mariadb
environment:
- MARIADB_REPLICATION_MODE=master
- MARIADB_REPLICATION_USER=repl_user
- MARIADB_REPLICATION_PASSWORD=repl_password
- MARIADB_ROOT_PASSWORD=master_root_password
- MARIADB_USER=my_user
- MARIADB_PASSWORD=my_password
- MARIADB_DATABASE=my_database
healthcheck:
test: ['CMD', '/opt/bitnami/scripts/mariadb-master/healthcheck.sh']
interval: 15s
timeout: 5s
retries: 6
mariadb-slave:
image: 'bitnami/mariadb:10.6'
ports:
- '3306'
depends_on:
- mariadb-master
environment:
- MARIADB_REPLICATION_MODE=slave
- MARIADB_REPLICATION_USER=repl_user
- MARIADB_REPLICATION_PASSWORD=repl_password
- MARIADB_MASTER_HOST=mariadb-master
- MARIADB_MASTER_PORT_NUMBER=3306
- MARIADB_MASTER_ROOT_PASSWORD=master_root_password
healthcheck:
test: ['CMD', '/opt/bitnami/scripts/mariadb-slave/healthcheck.sh']
interval: 15s
timeout: 5s
retries: 6