From c457dd6458cd1231dc3305de360ab9ac80a34427 Mon Sep 17 00:00:00 2001 From: root <1510183@gmail.com> Date: Thu, 6 Aug 2020 22:51:53 +0000 Subject: [PATCH] readme update --- README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 52564ac..0b4fd32 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,28 @@ Clone git repository to local folder ## Configure +If you need to enable replication of mysql server, you need to run preconfigured mysql container. +To do this, create config file with parameters for mysql slave server: +``` +cat < slave.cnf +``` +[mysqld] + +server-id = 102 +log_bin = /var/log/mysql/mysql-bin.log +relay-log = /var/log/mysql/mysql-relay-bin.log +binlog_do_db = amavisd +binlog_do_db = iredadmin +binlog_do_db = iredapd +binlog_do_db = roundcubemail +bind-address = 0.0.0.0 + +``` + +... and run container from this directory: +```docker run --name slave-mariadb -v ./slave.cnf:/etc/mysql/conf.d/slave.cnf -e MYSQL_ROOT_PASSWORD=(the sama password as in master server) -d -p 3306:3306 mariadb:latest``` + + add FQDN name in ```docker-compose.yml``` file create file ```ireddocker/iredmail-env.conf```, like this: @@ -21,8 +43,11 @@ LDAP_EXTERNAL_BINDPW=#bind password for ldap LDAP_EXTERNAL_BINDUSER=#bind user for ldap LDAP_EXTERNAL_BASE=#base dn for mail users FIRST_DOMAIN=#mail domain name +MYSQL_MASTER_ADDRESS=#address of master server in case of replication +MYSQL_SLAVE_ADDRESS=#address of slsve server in case of replication +MYSQL_DATABASES="amavis iredadmin iredapd roundcubemail" +MYSQL_USE_REPLICTION=YES MYSQLEXIST=#usage existing databse -MYSQL_SERVER_ADDRESS=#server address of mysql external database MYSQL_ROOT_USER=#name for admin(root) user of external database MYSQL_ROOT_PASSWD=#passwd for admin(root) user of external database CUSTOM_CERT_USE:=NO#usage of external cert file. If Yes - place certfile in cert_dir directory, in global catalog