Added database container
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# Container Config Files
|
||||
|
||||
All files in this folder are config files of some sort for services that run inside the container.
|
||||
The contents of this folder will be copied to `/etc/` during the build of the Docker image.
|
||||
|
||||
For further informations regarding the configuration of specific services, check out the commentary
|
||||
inside the config files and/or the service's manuals.
|
||||
|
||||
Florian Meissner, DL1MRV
|
||||
@@ -0,0 +1,86 @@
|
||||
# ****************************************************************************************************
|
||||
# * ______ _ _ *
|
||||
# * | ____| /\ (_) | | *
|
||||
# * | |__ _ _ _ __ ___ _ __ ___ __ _ _ __ / \ _ _ __ _ __ ___ _ __| |_ ___ *
|
||||
# * | __|| | | | '__/ _ \| '_ \ / _ \/ _` | '_ \ / /\ \ | | '__| '_ \ / _ \| '__| __/ __| *
|
||||
# * | |___| |_| | | | (_) | |_) | __/ (_| | | | | / ____ \| | | | |_) | (_) | | | |_\__ \ *
|
||||
# * |______\__,_|_| \___/| .__/ \___|\__,_|_| |_| /_/ \_\_|_| | .__/ \___/|_| \__|___/ *
|
||||
# * | | | | *
|
||||
# * |_| |_| *
|
||||
# * *
|
||||
# ****************************************************************************************************
|
||||
|
||||
# This file is part of the European Airports Project, a free, collaborative platform of airport data
|
||||
# extending beyond the official AIPs.
|
||||
|
||||
# Copyright (C) 2023
|
||||
|
||||
# Florian Meissner <florianmeissner@gmx.de>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify it under the
|
||||
# terms of the GNU General Public License as published by the Free Software Foundation, either
|
||||
# version 3 of the License, or (at your option) any later version. This program is distributed in the
|
||||
# hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details. You should have received a copy of the GNU General Public License along with this program.
|
||||
# (license.md in the root folder of this project) If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# This is the MariaDB configuration for the logrotate utility
|
||||
#
|
||||
# Note that on most Linux systems logs are written to journald, which has its
|
||||
# own rotation scheme.
|
||||
#
|
||||
# Read https://mariadb.com/kb/en/error-log/ to learn more about logging and
|
||||
# https://mariadb.com/kb/en/rotating-logs-on-unix-and-linux/ about rotating logs.
|
||||
|
||||
/var/log/mysql/*.log {
|
||||
|
||||
# If any of the files listed above is missing, skip them silently without
|
||||
# emitting any errors
|
||||
missingok
|
||||
|
||||
# If file exists but is empty, don't rotate it
|
||||
notifempty
|
||||
|
||||
# Run daily
|
||||
daily
|
||||
|
||||
# Keep 14 days of logs
|
||||
rotate 14
|
||||
|
||||
# Compress logs, as they are text and compression will save a lot of disk space
|
||||
compress
|
||||
|
||||
# Don't compress the log immediately to avoid errors about "file size changed while zipping"
|
||||
delaycompress
|
||||
|
||||
# Don't run the postrotate script for each file configured in this file, but
|
||||
# run it only once if one or more files were rotated
|
||||
sharedscripts
|
||||
|
||||
# Immediately create new logfile
|
||||
create 640 mysql adm
|
||||
|
||||
# After each rotation, run this custom script to flush the logs. Note that
|
||||
# this assumes that the mariadb-admin command has database access, which it
|
||||
# has thanks to the default use of Unix socket authentication for the 'root'
|
||||
# account used everywhere since MariaDB 10.4.
|
||||
postrotate
|
||||
if test -r /run/secrets/root_name
|
||||
then
|
||||
user=`/usr/bin/cat /run/secrets/root_name`
|
||||
user="-u $user"
|
||||
fi
|
||||
|
||||
if test -r /run/secrets/root_pw
|
||||
then
|
||||
pw=`/usr/bin/cat /run/secrets/root_pw`
|
||||
pw="-p$pw"
|
||||
fi
|
||||
|
||||
if test -x /usr/bin/mariadb-admin
|
||||
then
|
||||
/usr/bin/mariadb-admin --local $user $pw flush-logs
|
||||
fi
|
||||
endscript
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
# ****************************************************************************************************
|
||||
# * ______ _ _ *
|
||||
# * | ____| /\ (_) | | *
|
||||
# * | |__ _ _ _ __ ___ _ __ ___ __ _ _ __ / \ _ _ __ _ __ ___ _ __| |_ ___ *
|
||||
# * | __|| | | | '__/ _ \| '_ \ / _ \/ _` | '_ \ / /\ \ | | '__| '_ \ / _ \| '__| __/ __| *
|
||||
# * | |___| |_| | | | (_) | |_) | __/ (_| | | | | / ____ \| | | | |_) | (_) | | | |_\__ \ *
|
||||
# * |______\__,_|_| \___/| .__/ \___|\__,_|_| |_| /_/ \_\_|_| | .__/ \___/|_| \__|___/ *
|
||||
# * | | | | *
|
||||
# * |_| |_| *
|
||||
# * *
|
||||
# ****************************************************************************************************
|
||||
|
||||
# This file is part of the European Airports Project, a free, collaborative platform of airport data
|
||||
# extending beyond the official AIPs.
|
||||
|
||||
# Copyright (C) 2023
|
||||
|
||||
# Florian Meissner <florianmeissner@gmx.de>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify it under the
|
||||
# terms of the GNU General Public License as published by the Free Software Foundation, either
|
||||
# version 3 of the License, or (at your option) any later version. This program is distributed in the
|
||||
# hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details. You should have received a copy of the GNU General Public License along with this program.
|
||||
# (license.md in the root folder of this project) If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Project specific config file for MariaDB server.
|
||||
# Place all setting overriding the default values in here.
|
||||
# This file is linked to the container as a volume
|
||||
|
||||
|
||||
[mariadb]
|
||||
|
||||
# Take logging away from Docker so that it can be used by CheckMk
|
||||
log_output=FILE
|
||||
log_error=/var/log/mysql/error.log
|
||||
log_warnings=3
|
||||
|
||||
# ONLY ENABLE general_log IN DEVELOPMENT ENVIRONTMENTS!!!
|
||||
# This file will store every query and will grow rather quickly. It may also store confidential data!
|
||||
general_log=1
|
||||
general_log_file=/var/log/mysql/access.log
|
||||
|
||||
# Log slow queries
|
||||
slow_query_log=1
|
||||
slow_query_log_file=/var/log/mysql/slow.log
|
||||
long_query_time=10 # sec
|
||||
log_queries_not_using_indexes=ON
|
||||
min_examined_row_limit=10000
|
||||
log_slow_admin_statements=ON
|
||||
log_slow_verbosity=query_plan,explain
|
||||
Reference in New Issue
Block a user