fix mysql custom config #2
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Paolo Asperti 2019-11-24 11:56:17 +01:00
parent 9e32c2213e
commit 9663e150c3
Signed by: paspo
GPG Key ID: 06D46905D19D5182
2 changed files with 5 additions and 3 deletions

View File

@ -3,7 +3,7 @@ FROM mariadb:10
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
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 automysqlbackup /etc/default
COPY sudoers /etc/sudoers.d/mysudoers

View File

@ -332,11 +332,13 @@ if ! _is_sourced; then
cat >>/etc/mysql/mariadb.conf.d/settings.cnf <<EOF
server_id = ${SERVER_ID}
replicate-do-db=${REPLICATE_DO_DB}
replicate-do-db = ${REPLICATE_DO_DB}
EOF
if [ "$READONLY" = "1" ] ; then
echo "read-only" >> /etc/mysql/mariadb.conf.d/settings.cnf
fi
sudo service cron start
sudo service cron start
_main "$@"
fi