From 0263d76021d75a5ad815de75cc064db21d1644e1 Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 31 May 2023 14:58:16 +0200 Subject: [PATCH 1/4] refs #5701 update to mariadb 10.7.7 --- db/Dockerfile | 15 ++------------- db/docker/docker-temp-stop.sh | 1 - db/dump/mysqlPlugins.sql | 4 ---- 3 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 db/dump/mysqlPlugins.sql diff --git a/db/Dockerfile b/db/Dockerfile index 053fbcee6..8e99e85af 100644 --- a/db/Dockerfile +++ b/db/Dockerfile @@ -1,19 +1,10 @@ -FROM mariadb:10.7.5 +FROM mariadb:10.7.7 -ENV MYSQL_ROOT_PASSWORD root +ENV MARIADB_ROOT_PASSWORD root ENV TZ Europe/Madrid ARG MOCKDATE=2001-01-01 11:00:00 ARG DEBIAN_FRONTEND=noninteractive -RUN apt-get update \ - && apt-get install -y --no-install-recommends curl ca-certificates \ - && curl -sL https://apt.verdnatura.es/conf/verdnatura.gpg | apt-key add - \ - && echo "deb http://apt.verdnatura.es/ jessie main" > /etc/apt/sources.list.d/vn.list \ - && apt-get update \ - && apt-get install -y vn-mariadb \ - && apt-get purge -y --auto-remove curl ca-certificates \ - && rm -rf /var/lib/apt/lists/* - COPY docker/docker.cnf /etc/mysql/conf.d/ COPY \ docker/docker-init.sh \ @@ -31,13 +22,11 @@ WORKDIR /docker-boot COPY \ import-changes.sh \ config.ini \ - dump/mysqlPlugins.sql \ dump/structure.sql \ dump/mockDate.sql \ dump/dumpedFixtures.sql \ ./ RUN gosu mysql docker-init.sh \ - && docker-dump.sh mysqlPlugins \ && docker-dump.sh structure \ && sed -i -e 's/@mockDate/'"$MOCKDATE"'/g' mockDate.sql \ && docker-dump.sh mockDate \ diff --git a/db/docker/docker-temp-stop.sh b/db/docker/docker-temp-stop.sh index df66959df..418331f75 100755 --- a/db/docker/docker-temp-stop.sh +++ b/db/docker/docker-temp-stop.sh @@ -4,4 +4,3 @@ CMD=mysqld docker_setup_env "$CMD" -docker_temp_server_stop diff --git a/db/dump/mysqlPlugins.sql b/db/dump/mysqlPlugins.sql deleted file mode 100644 index c3b6f6ee4..000000000 --- a/db/dump/mysqlPlugins.sql +++ /dev/null @@ -1,4 +0,0 @@ - --- Import compiled functions -CREATE AGGREGATE FUNCTION minacum RETURNS INT SONAME 'minacum.so'; -CREATE AGGREGATE FUNCTION multimax RETURNS INT SONAME 'multimax.so'; From 4f3b6c303578584629ae7528935c5450c7abd666 Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 31 May 2023 15:00:33 +0200 Subject: [PATCH 2/4] typo --- db/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/Dockerfile b/db/Dockerfile index 8e99e85af..719b85393 100644 --- a/db/Dockerfile +++ b/db/Dockerfile @@ -1,6 +1,6 @@ FROM mariadb:10.7.7 -ENV MARIADB_ROOT_PASSWORD root +ENV MYSQL_ROOT_PASSWORD root ENV TZ Europe/Madrid ARG MOCKDATE=2001-01-01 11:00:00 ARG DEBIAN_FRONTEND=noninteractive From fdb9d2ed7f6e9dc01aa58d8c5a5af5817bbecf7a Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 9 Jun 2023 14:38:44 +0200 Subject: [PATCH 3/4] refs #5701 fix dockerFile and sh's --- db/Dockerfile | 20 +++++-------------- ...ocker-temp-start.sh => docker-fixtures.sh} | 3 +++ db/docker/docker-init.sh | 2 ++ db/docker/docker-structure.sh | 18 +++++++++++++++++ db/docker/docker-temp-stop.sh | 6 ------ 5 files changed, 28 insertions(+), 21 deletions(-) rename db/docker/{docker-temp-start.sh => docker-fixtures.sh} (62%) create mode 100755 db/docker/docker-structure.sh delete mode 100755 db/docker/docker-temp-stop.sh diff --git a/db/Dockerfile b/db/Dockerfile index 719b85393..15f947e08 100644 --- a/db/Dockerfile +++ b/db/Dockerfile @@ -7,11 +7,9 @@ ARG DEBIAN_FRONTEND=noninteractive COPY docker/docker.cnf /etc/mysql/conf.d/ COPY \ - docker/docker-init.sh \ - docker/docker-temp-start.sh \ - docker/docker-temp-stop.sh \ docker/docker-dump.sh \ - docker/docker-start.sh \ + docker/docker-structure.sh \ + docker/docker-fixtures.sh \ /usr/local/bin/ RUN mkdir /mysql-data \ @@ -26,20 +24,12 @@ COPY \ dump/mockDate.sql \ dump/dumpedFixtures.sql \ ./ -RUN gosu mysql docker-init.sh \ - && docker-dump.sh structure \ - && sed -i -e 's/@mockDate/'"$MOCKDATE"'/g' mockDate.sql \ - && docker-dump.sh mockDate \ - && docker-dump.sh dumpedFixtures \ - && gosu mysql docker-temp-stop.sh - +RUN sed -i -e 's/@mockDate/'"$MOCKDATE"'/g' mockDate.sql \ + && gosu mysql docker-structure.sh COPY changes ./changes COPY dump/fixtures.sql ./ ARG STAMP=unknown -RUN gosu mysql docker-temp-start.sh \ - && ./import-changes.sh \ - && docker-dump.sh fixtures \ - && gosu mysql docker-temp-stop.sh +RUN gosu mysql docker-fixtures.sh RUN echo "[INFO] -> Import finished" \ && rm -rf /docker-boot diff --git a/db/docker/docker-temp-start.sh b/db/docker/docker-fixtures.sh similarity index 62% rename from db/docker/docker-temp-start.sh rename to db/docker/docker-fixtures.sh index fc067102f..0de6114d9 100755 --- a/db/docker/docker-temp-start.sh +++ b/db/docker/docker-fixtures.sh @@ -5,3 +5,6 @@ CMD=mysqld docker_setup_env "$CMD" docker_temp_server_start "$CMD" +bash import-changes.sh +docker-dump.sh fixtures +docker_temp_server_stop diff --git a/db/docker/docker-init.sh b/db/docker/docker-init.sh index ccd14283e..b58510436 100755 --- a/db/docker/docker-init.sh +++ b/db/docker/docker-init.sh @@ -12,3 +12,5 @@ docker_init_database_dir "$CMD" docker_temp_server_start "$CMD" docker_setup_db docker_process_init_files /docker-entrypoint-initdb.d/* +echo $MARIADB_PID +export MARIADB_PID diff --git a/db/docker/docker-structure.sh b/db/docker/docker-structure.sh new file mode 100755 index 000000000..b119e38fd --- /dev/null +++ b/db/docker/docker-structure.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +. /usr/local/bin/docker-entrypoint.sh +CMD=mysqld + +mysql_check_config "$CMD" +docker_setup_env "$CMD" +docker_create_db_directories + +docker_verify_minimum_env +docker_init_database_dir "$CMD" +docker_temp_server_start "$CMD" +docker_setup_db +docker_process_init_files /docker-entrypoint-initdb.d/* +docker-dump.sh structure +docker-dump.sh mockDate +docker-dump.sh dumpedFixtures +docker_temp_server_stop diff --git a/db/docker/docker-temp-stop.sh b/db/docker/docker-temp-stop.sh deleted file mode 100755 index 418331f75..000000000 --- a/db/docker/docker-temp-stop.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -. /usr/local/bin/docker-entrypoint.sh -CMD=mysqld - -docker_setup_env "$CMD" From 33f2d556fd92606eb9c105c9448c5d2ae125e1b0 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 12 Jun 2023 07:33:45 +0200 Subject: [PATCH 4/4] refs #5701 fix(db/dockerFile): fix docker-temp-stop --- db/Dockerfile | 3 +++ db/docker/docker-init.sh | 2 -- db/docker/docker-structure.sh | 15 ++------------- db/docker/docker-temp-stop.sh | 7 +++++++ 4 files changed, 12 insertions(+), 15 deletions(-) create mode 100644 db/docker/docker-temp-stop.sh diff --git a/db/Dockerfile b/db/Dockerfile index 15f947e08..448b8b03a 100644 --- a/db/Dockerfile +++ b/db/Dockerfile @@ -7,6 +7,9 @@ ARG DEBIAN_FRONTEND=noninteractive COPY docker/docker.cnf /etc/mysql/conf.d/ COPY \ + docker/docker-start.sh \ + docker/docker-init.sh \ + docker/docker-temp-stop.sh \ docker/docker-dump.sh \ docker/docker-structure.sh \ docker/docker-fixtures.sh \ diff --git a/db/docker/docker-init.sh b/db/docker/docker-init.sh index b58510436..ccd14283e 100755 --- a/db/docker/docker-init.sh +++ b/db/docker/docker-init.sh @@ -12,5 +12,3 @@ docker_init_database_dir "$CMD" docker_temp_server_start "$CMD" docker_setup_db docker_process_init_files /docker-entrypoint-initdb.d/* -echo $MARIADB_PID -export MARIADB_PID diff --git a/db/docker/docker-structure.sh b/db/docker/docker-structure.sh index b119e38fd..75a1c24f3 100755 --- a/db/docker/docker-structure.sh +++ b/db/docker/docker-structure.sh @@ -1,18 +1,7 @@ #!/bin/bash -. /usr/local/bin/docker-entrypoint.sh -CMD=mysqld - -mysql_check_config "$CMD" -docker_setup_env "$CMD" -docker_create_db_directories - -docker_verify_minimum_env -docker_init_database_dir "$CMD" -docker_temp_server_start "$CMD" -docker_setup_db -docker_process_init_files /docker-entrypoint-initdb.d/* +. docker-init.sh docker-dump.sh structure docker-dump.sh mockDate docker-dump.sh dumpedFixtures -docker_temp_server_stop +. docker-temp-stop.sh diff --git a/db/docker/docker-temp-stop.sh b/db/docker/docker-temp-stop.sh new file mode 100644 index 000000000..df66959df --- /dev/null +++ b/db/docker/docker-temp-stop.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +. /usr/local/bin/docker-entrypoint.sh +CMD=mysqld + +docker_setup_env "$CMD" +docker_temp_server_stop