Skip to content

Commit

Permalink
Draft 2 - max_packet_now has default env but still NOT dynamic. Confd…
Browse files Browse the repository at this point in the history
… env values ignored
  • Loading branch information
Gavin Morris committed Oct 30, 2023
1 parent 3fdce2d commit 672b564
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
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 value of 256 MB in bytes
ENV DB_MAX_ALLOWED_PACKET=268435456

COPY --link rootfs /
Empty file.
1 change: 1 addition & 0 deletions mariadb/rootfs/etc/s6-overlay/s6-rc.d/set-max-packet/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oneshot
1 change: 1 addition & 0 deletions mariadb/rootfs/etc/s6-overlay/s6-rc.d/set-max-packet/up
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/etc/s6-overlay/scripts/set-max-packet.sh
2 changes: 1 addition & 1 deletion mariadb/rootfs/etc/s6-overlay/scripts/set-max-packet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# shellcheck shell=bash
set -e

# Use what has been provided by the user or default to the derived values.
# Use what has been provided by the user or default value of 256M
cat <<EOF | /usr/local/bin/confd-import-environment.sh
DB_MAX_ALLOWED_PACKET={{ getenv "DB_MAX_ALLOWED_PACKET" "${DB_MAX_ALLOWED_PACKET}" }}
EOF

0 comments on commit 672b564

Please sign in to comment.