From 1af7a22460dafe12f22f9b564d946f3d583f4cb0 Mon Sep 17 00:00:00 2001 From: startxfr Date: Sun, 6 Dec 2015 03:44:47 +0100 Subject: debuging images and improve startup display --- Services/mariadb/README.md | 4 ++-- Services/mariadb/docker-compose.yml | 2 +- Services/mariadb/run.sh | 23 ++++++++++++----------- 3 files changed, 15 insertions(+), 14 deletions(-) (limited to 'Services/mariadb') diff --git a/Services/mariadb/README.md b/Services/mariadb/README.md index 1370d83..3e9733f 100644 --- a/Services/mariadb/README.md +++ b/Services/mariadb/README.md @@ -18,8 +18,8 @@ based on [startx/fedora container](https://hub.docker.com/r/startx/fedora) ## Available flavours -* `:latest` : Fedora core 23 + MariaDB -* `:fc23` : Fedora core 23 + MariaDB +* `:latest` : Fedora core 23 + MariaDB 10.0.21 (compat mysql 15.1) +* `:fc23` : Fedora core 23 + MariaDB 10.0.21 (compat mysql 15.1) * `:fc22` : Fedora core 22 + MariaDB * `:fc21` : Fedora core 21 + MariaDB * `:centos7` : CentOS 7 + MariaDB diff --git a/Services/mariadb/docker-compose.yml b/Services/mariadb/docker-compose.yml index a42f575..29242d7 100644 --- a/Services/mariadb/docker-compose.yml +++ b/Services/mariadb/docker-compose.yml @@ -6,7 +6,7 @@ server: cpu_shares: 8 restart: "on-failure:2" ports: - - "3306:3306" + - "9231:3306" environment: CONTAINER_TYPE: "service" CONTAINER_SERVICE: "mariadb" diff --git a/Services/mariadb/run.sh b/Services/mariadb/run.sh index b8f8aed..d3bd4c1 100644 --- a/Services/mariadb/run.sh +++ b/Services/mariadb/run.sh @@ -21,12 +21,12 @@ function display_container_mariadb_header { if [ -v CONTAINER_TYPE ]; then echo "| Type : $CONTAINER_TYPE" fi - if [ -v CONTAINER_INSTANCE ]; then - echo "| Instance : $CONTAINER_INSTANCE" - fi if [ -v CONTAINER_SERVICE ]; then echo "| Service : $CONTAINER_SERVICE" fi + if [ -v CONTAINER_INSTANCE ]; then + echo "| Instance : $CONTAINER_INSTANCE" + fi if [ -v DATA_PATH ]; then echo "| Data path : $DATA_PATH" fi @@ -65,11 +65,19 @@ function begin_config { chmod 0774 $LOADSQL_PATH; chown mysql:mysql $LOADSQL_PATH fi + echo "" >> $MY_CONF + echo "[mysqld]" >> $MY_CONF + echo "datadir=$DATA_PATH" >> $MY_CONF + echo "log-error=$LOG_PATH/mysqld.log" >> $MY_CONF + echo "" >> $MY_CONF + echo "[mariadb]" >> $MY_CONF + echo "datadir=$DATA_PATH" >> $MY_CONF + echo "log-error=$LOG_PATH/mariadb.log" >> $MY_CONF VOLUME_HOME=$DATA_PATH/mysql if [[ ! -d $VOLUME_HOME ]]; then echo "mariadb directory is empty or uninitialized" echo "Installing MariaDB in $DATA_PATH ..." - mysql_install_db > /dev/null 2>&1 + mysql_install_db --datadir=$DATA_PATH --defaults-file=$MY_CONF --user=mysql > /dev/null 2>&1 chown mysql:mysql -R $DATA_PATH echo "Installing MariaDB in $DATA_PATH is DONE !" else @@ -77,13 +85,6 @@ function begin_config { echo "Reusing MariaDB in $DATA_PATH ..." chown mysql:mysql -R $DATA_PATH fi - echo "" >> $MY_CONF - echo "[mysqld]" >> $MY_CONF - echo "datadir=$DATA_PATH" >> $MY_CONF - echo "log-error=$LOG_PATH/mysqld.log" >> $MY_CONF - echo "" >> $MY_CONF - echo "[mariadb]" >> $MY_CONF - echo "log-error=$LOG_PATH/mariadb.log" >> $MY_CONF } function config_startserver { -- cgit v1.2.3