...
Codeblock |
---|
|
#!/usr/bin/env bash
set -euo pipefail
##
# This script exists to work-around the fact that
# mysql does not support logging to stdout
#
# This will tail the file logs configured in ./my.cnf
##
LOG_PATHS=(
'/var/log/mysql/slow.log'
'/var/log/mysql/query.log'
)
for LOG_PATH in "${LOG_PATHS[@]}"; do
( umask 0 && truncate -s0 "$LOG_PATH" )
tail --pid $$ -n0 -F "$LOG_PATH" &
done
/usr/local/bin/docker-entrypoint.sh mariadbd |
Wichtig: Die Datei entrypoint.sh benötigt Ausführungsrechte für "other":
Codeblock |
---|
chmod o+x ./entrypoint.sh |
Cluster-Konfiguration (Kubernetes)