fix mysql custom config #2
This commit is contained in:
parent
9e32c2213e
commit
9663e150c3
@ -3,7 +3,7 @@ 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
|
||||||
|
|
||||||
COPY mysql.cnf /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
|
RUN chown mysql: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
|
||||||
|
@ -334,9 +334,11 @@ if ! _is_sourced; then
|
|||||||
server_id = ${SERVER_ID}
|
server_id = ${SERVER_ID}
|
||||||
replicate-do-db = ${REPLICATE_DO_DB}
|
replicate-do-db = ${REPLICATE_DO_DB}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ "$READONLY" = "1" ] ; then
|
if [ "$READONLY" = "1" ] ; then
|
||||||
echo "read-only" >> /etc/mysql/mariadb.conf.d/settings.cnf
|
echo "read-only" >> /etc/mysql/mariadb.conf.d/settings.cnf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo service cron start
|
sudo service cron start
|
||||||
_main "$@"
|
_main "$@"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user