add slave1

This commit is contained in:
Ludovic CANDELLIER
2024-01-22 23:04:23 +01:00
parent 6a1d8ba80a
commit 8c39035cdc
2 changed files with 35 additions and 0 deletions

20
docker/mysql-slave1/Dockerfile Executable file
View File

@@ -0,0 +1,20 @@
ARG MYSQL_VERSION
FROM mysql:${MYSQL_VERSION}
LABEL maintainer="Ludovic CANDELLIER <ludo@huma.net>"
#####################################
# Set Timezone
#####################################
ARG TZ=UTC
ENV TZ ${TZ}
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && chown -R mysql:root /var/lib/mysql/
COPY my.cnf /etc/mysql/conf.d/my.cnf
RUN chmod 0444 /etc/mysql/conf.d/my.cnf
CMD ["mysqld"]
EXPOSE 3306

15
docker/mysql-slave1/my.cnf Executable file
View File

@@ -0,0 +1,15 @@
# The MySQL Client configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[mysql]
[mysqld]
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
character-set-server=utf8
default-authentication-plugin=mysql_native_password
#[Must] Start Binary Logs
log-bin=mysql-bin
#[Must] Set the unique ID of the server, default 1, usually the last segment of IP
server-id=3002