Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mariadb max_packet_allowed variable exposed #295

Merged
merged 9 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mariadb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ RUN --mount=type=cache,id=mariadb-apk-${TARGETARCH},sharing=locked,target=/var/c
# base image. Set to 10 minutes just incase it ran on very old or overallocated
# hardware.
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=600000
# Default Mariadb value of 16 MB (bytes)
ENV MYSQL_MAX_ALLOWED_PACKET=16777216

COPY --link rootfs /
1 change: 1 addition & 0 deletions mariadb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ default database connection configuration.
| :------------------- | :------ | :------------------------------------------------------------------------------------ |
| 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.cnf.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 = "0664"
keys = [ "/" ]
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# this is only for the mysqld standalone daemon
[mysqld]
# skip-networking

max_allowed_packet ={{ getenv "MYSQL_MAX_ALLOWED_PACKET" }}
# Galera-related settings
[galera]
# Mandatory settings
Expand Down
Loading