Skip to content

Commit

Permalink
Added MYSQL_MAX_ALLOWED_PACKET environment variable for the mariadb i…
Browse files Browse the repository at this point in the history
…mage.
  • Loading branch information
nigelgbanks committed Oct 29, 2023
1 parent 124907e commit 474a5bb
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
2 changes: 2 additions & 0 deletions mariadb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ RUN --mount=type=cache,id=mariadb-apk-${TARGETARCH},sharing=locked,target=/var/c
# hardware.
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=600000

ENV MYSQL_MAX_ALLOWED_PACKET=16777216

COPY --link rootfs /
9 changes: 5 additions & 4 deletions mariadb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ Requires `islandora/base` docker image to build. Please refer to the
Please see the documentation in the [base image] for more information about the
default database connection configuration.

| Environment Variable | Default | Description |
| :------------------- | :------ | :------------------------------------------------------------------------------------ |
| MYSQL_ROOT_PASSWORD | | The database root user password. Defaults to `DB_ROOT_PASSWORD` |
| MYSQL_ROOT_USER | | The database root user (used to create the site database). Defaults to `DB_ROOT_USER` |
| Environment Variable | Default | Description |
| :----------------------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- |
| MYSQL_ROOT_PASSWORD | | The database root user password. Defaults to `DB_ROOT_PASSWORD` |
| MYSQL_ROOT_USER | | The database root user (used to create the site database). Defaults to `DB_ROOT_USER` |
| MYSQL_MAX_ALLOWED_PACKET | 16777216 | Max packet length to send to or receive from the server, [documentation](https://mariadb.com/docs/server/ref/mdb/system-variables/max_allowed_packet/) |

## Logs

Expand Down
7 changes: 7 additions & 0 deletions mariadb/rootfs/etc/confd/conf.d/mariadb-server.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[template]
src = "mariadb-server.cnf.tmpl"
dest = "/etc/my.cnf.d/mariadb-server.cnf"
uid = 0
gid = 0
mode = "0644"
keys = [ "/" ]
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
[mysqld]
# skip-networking

# Allow for max_allowed_packet.
max_allowed_packet={{ getenv "MYSQL_MAX_ALLOWED_PACKET" }}

# Galera-related settings
[galera]
# Mandatory settings
Expand All @@ -35,7 +38,7 @@
# you can put MariaDB-only options here
[mariadb]

# This group is only read by MariaDB-10.3 servers.
# This group is only read by MariaDB-10.5 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.3]
[mariadb-10.5]

0 comments on commit 474a5bb

Please sign in to comment.