Compare commits

...

3 Commits

Author SHA1 Message Date
1c23ba75b8 - Add healthcheck example in compose file. 2024-10-29 09:10:02 +01:00
17ddc89aa4 - Now use server-mga9:1.1.3 image,
- Variabilization of external server ports in env & compose file,
- Now use docker_tools for .env building.
2024-10-05 18:18:19 +02:00
5921ce323b - Now based on server-mga9:1.1.2 image. 2024-08-28 16:32:09 +02:00
6 changed files with 51 additions and 9 deletions

View File

@ -3,7 +3,7 @@
ARG IMG_URL_PREFIX="rx3"
FROM ${IMG_URL_PREFIX}/server-mga9:1.1.1
FROM ${IMG_URL_PREFIX}/server-mga9:1.1.3
ARG IMG_NAME
ARG IMG_FULL_NAME
@ -23,7 +23,7 @@ ARG MYSQLD='#!/bin/bash
usermod -u ${MARIADB_UID} mysql \n\
groupmod -g ${MARIADB_GID} mysql \n\
\n\
chown -R mysql:mysql /var/log/mysqld /var/run/mysqld \n\
chown -R mysql:mysql /var/lib/mysql /var/log/mysqld /var/run/mysqld \n\
\n\
sed -i -e "s/^skip-networking/#skip-networking/" /etc/my.cnf.d/server.cnf \n\
sed -i -e "s/^plugin-load-add=/#plugin-load-add=/" /etc/my.cnf.d/cracklib_password_check.cnf \n\
@ -34,7 +34,7 @@ echo "CREATE USER `root`@`${MARIADB_ROOT_HOST}` IDENTIFIED BY `${MARIADB_ROOT_PA
\n\
if [[ -n "${MARIADB_DATABASE}" ]] \n\
then \n\
echo "CREATE DATABASE IF NOT EXISTS $MARIADB_DATABASE;" >>/tmp/post.sql \n\
echo "CREATE DATABASE IF NOT EXISTS ${MARIADB_DATABASE};" >>/tmp/post.sql \n\
fi \n\
\n\
if [[ -n "${MARIADB_USER}" ]] && [[ -n "${MARIADB_PASSWORD}" ]] \n\

View File

@ -5,7 +5,7 @@ Welcome to Rx3/MariaDB-Mga9 docker image!
This is project aims to build a MariaDB + Mageia 9 docker image used by others Rx3 packaging projects.
Features:
- Curtently based on rx3/server-mga9:1.1.1 image,
- Curtently based on rx3/server-mga9:1.1.3 image,
- Following env vars supported:
- MARIADB_UID & MARIADB_GID,
- MARIADB_ROOT_HOST & MARIADB_ROOT_PASSWORD,

View File

@ -1,3 +1,29 @@
------------------------------------------------------------------------------------------------------------------------------------
Rx3/MariaDB-Mga9 V 1.0.2 - A. GIBERT - 2024/11/xx
------------------------------------------------------------------------------------------------------------------------------------
- Add healthcheck example in compose file.
------------------------------------------------------------------------------------------------------------------------------------
Rx3/MariaDB-Mga9 V 1.0.1 - A. GIBERT - 2024/10/05
------------------------------------------------------------------------------------------------------------------------------------
- Now use server-mga9:1.1.3 image,
- Variabilization of external server ports in env & compose file,
- Now use docker_tools for .env building.
------------------------------------------------------------------------------------------------------------------------------------
Rx3/MariaDB-Mga9 V 1.0.1 - A. GIBERT - 2024/08/28
------------------------------------------------------------------------------------------------------------------------------------
- Now based on server-mga9:1.1.2 image.
------------------------------------------------------------------------------------------------------------------------------------
Rx3/MariaDB-Mga9 V 1.0.0 - A. GIBERT - 2024/08/27
------------------------------------------------------------------------------------------------------------------------------------

View File

@ -30,11 +30,17 @@ services:
MARIADB_USER: ${MARIADB_USER}
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
healthcheck:
test: ["CMD", 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', '-p${MARIADB_ROOT_PASSWORD}' ]
interval: 10s
timeout: 3s
retries: 3
volumes:
- ./mysql:/var/lib/mysql
- ./var/lib/mysql:/var/lib/mysql
network_mode: bridge
ports:
- "127.0.0.1:9012:9001"
- "127.0.0.1:8006:3306"
- "127.0.0.1:${DATABASE_SV_PORT}:9001"
- "127.0.0.1:${DATABASE_PORT}:3306"

View File

@ -17,7 +17,7 @@ IMG_URL_PREFIX="${IMG_REGISTRY}/${IMG_ORG}"
IMG_NAME="mariadb-mga9"
IMG_FULL_NAME="Rx3 MariaDB Mageia-9 Docker Image"
IMG_VERSION="1.0.0"
IMG_VERSION="1.0.2"
IMG_URL="${IMG_URL_PREFIX}/${IMG_NAME}:${IMG_VERSION}"
IMG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
@ -27,9 +27,15 @@ IMG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
# User Settings
#-------------------------------------------------------------------------------
ENV_PORT_OFFSET=0
SV_PORT_OFFSET=1000
DATABASE_PORT=$(( 8006 + ${ENV_PORT_OFFSET}))
DATABASE_SV_PORT=$(( ${DATABASE_PORT} + ${SV_PORT_OFFSET}))
MARIADB_UID=983
MARIADB_GID=981
MARIADB_ROOT_HOST= '%' # needs to be enclosed with quotes
MARIADB_ROOT_HOST='%' # needs to be enclosed with quotes
MARIADB_ROOT_PASSWORD="mysqladmin"
MARIADB_DATABASE="test"
MARIADB_USER="test"

4
var/lib/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore