From 0a9c1f5c35d07da48d8b216ec85024ca30e9b8b4 Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Tue, 28 Jul 2020 10:26:31 -0600 Subject: [PATCH] Configuration update --- Dockerfile | 3 +++ README.md | 4 ++-- config/my.cnf | 13 +++++++++++++ config/server.cnf | 45 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 config/my.cnf create mode 100644 config/server.cnf diff --git a/Dockerfile b/Dockerfile index d43ced3..95bffbd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,6 +32,9 @@ RUN groupadd -r mysql && \ chmod +x /usr/local/bin/docker-entrypoint.sh && \ ln -s usr/local/bin/docker-entrypoint.sh +COPY config/my.cnf /etc/my.cnf +COPY config/server.cnf /etc/my.cnf.d/server.cnf + USER mysql HEALTHCHECK --interval=5s --timeout=30s CMD mysqladmin ping -h 127.0.0.1 -u mysql || exit 1 diff --git a/README.md b/README.md index 6c5e697..8576ce7 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Version: 10.5.4 MariaDB is a community-developed fork of the MySQL relational database management system. -The Helm chart for MariaDB and rthe recommended secure confirugation in values-ironbank.yaml can be found [here](https://repo1.dsop.io/dsop/charts/-/tree/master/bitnami/mariadb) +The Helm chart for MariaDB and the recommended secure configuration in values-ironbank.yaml can be found [here](https://repo1.dsop.io/dsop/charts/-/tree/master/bitnami/mariadb) The [MariaDB documentation](https://mariadb.org/documentation/) provides an introduction, primer, list of SQL statements, and useful MariaDB queries: @@ -20,4 +20,4 @@ The standard location for the MariaDB volume is `/var/lib/mysql`. Further confiu ## Configuration -Configuration changed can be made in the `/etc/mysql/my.cnf` \ No newline at end of file +Configuration changes can be made in `/etc/my.cnf` and `/etc/my.cnf.d/` \ No newline at end of file diff --git a/config/my.cnf b/config/my.cnf new file mode 100644 index 0000000..ae78784 --- /dev/null +++ b/config/my.cnf @@ -0,0 +1,13 @@ +# +# This group is read both both by the client and the server +# use it for options that affect everything +# +[client-server] + +# +# include *.cnf from the config directory +# +!includedir /etc/my.cnf.d + +[mysqld] +bind-address = 0.0.0.0 \ No newline at end of file diff --git a/config/server.cnf b/config/server.cnf new file mode 100644 index 0000000..a9aa3cf --- /dev/null +++ b/config/server.cnf @@ -0,0 +1,45 @@ +# +# These groups are read by MariaDB server. +# Use it for options that only the server (but not clients) should see +# +# See the examples of server my.cnf files in /usr/share/mysql/ +# + +# this is read by the standalone daemon and embedded servers +[server] + +# this is only for the mysqld standalone daemon +[mysqld] + +# +# * Galera-related settings +# +[galera] +# Mandatory settings +#wsrep_on=ON +#wsrep_provider= +#wsrep_cluster_address= +#binlog_format=row +#default_storage_engine=InnoDB +#innodb_autoinc_lock_mode=2 +# +# Allow server to accept connections on all interfaces. +# +bind-address=0.0.0.0 +# +# Optional setting +#wsrep_slave_threads=1 +#innodb_flush_log_at_trx_commit=0 + +# this is only for embedded server +[embedded] + +# This group is only read by MariaDB servers, not by MySQL. +# If you use the same .cnf file for MySQL and MariaDB, +# you can put MariaDB-only options here +[mariadb] + +# This group is only read by MariaDB-10.3 servers. +# If you use the same .cnf file for MariaDB of different versions, +# use this group for options that older servers don't understand +[mariadb-10.5] \ No newline at end of file -- GitLab