fix mysql custom config
This commit is contained in:
parent
c3f9447a70
commit
9e32c2213e
@ -1,8 +1,9 @@
|
|||||||
FROM mariadb:10
|
FROM mariadb:10
|
||||||
|
|
||||||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -q -y cron sudo automysqlbackup
|
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -q -y cron sudo automysqlbackup
|
||||||
RUN touch /etc/mysql/mariadb.conf.d/settings.cnf && chown mysql /etc/mysql/mariadb.conf.d/settings.cnf
|
|
||||||
|
|
||||||
|
COPY mysql.cnf /etc/mysql/mariadb.conf.d/settings.cnf
|
||||||
|
RUN chown mysql /etc/mysql/mariadb.conf.d/settings.cnf
|
||||||
COPY docker-entrypoint.sh /usr/local/bin/
|
COPY docker-entrypoint.sh /usr/local/bin/
|
||||||
COPY automysqlbackup /etc/default
|
COPY automysqlbackup /etc/default
|
||||||
COPY sudoers /etc/sudoers.d/mysudoers
|
COPY sudoers /etc/sudoers.d/mysudoers
|
||||||
|
@ -327,15 +327,11 @@ _main() {
|
|||||||
|
|
||||||
# If we are sourced from elsewhere, don't perform any further actions
|
# If we are sourced from elsewhere, don't perform any further actions
|
||||||
if ! _is_sourced; then
|
if ! _is_sourced; then
|
||||||
SERVER_ID=${SERVERID:-33}
|
SERVER_ID=${SERVER_ID:-33}
|
||||||
READONLY=${READONLY:-1}
|
READONLY=${READONLY:-1}
|
||||||
|
|
||||||
cat >/etc/mysql/mariadb.conf.d/settings.cnf <<EOF
|
cat >>/etc/mysql/mariadb.conf.d/settings.cnf <<EOF
|
||||||
[mysqld]
|
|
||||||
server_id = ${SERVER_ID}
|
server_id = ${SERVER_ID}
|
||||||
log_bin
|
|
||||||
log-bin = binlog
|
|
||||||
max-binlog-size = 500M
|
|
||||||
replicate-do-db=${REPLICATE_DO_DB}
|
replicate-do-db=${REPLICATE_DO_DB}
|
||||||
EOF
|
EOF
|
||||||
if [ "$READONLY" = "1" ] ; then
|
if [ "$READONLY" = "1" ] ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user