How to start mysql 8? without conflicting with the default mariadb
I tried the following changes to add mysql8.0 support.
diff --git a/bin/ktd b/bin/ktd
index b82936d..9348e22 100755
--- a/bin/ktd
+++ b/bin/ktd
@@ -187,6 +187,9 @@ while [ $# -gt 0 ]; do
--os2)
set_searchengine "os2"
shift ;;
+ --mysql8.0)
+ ENABLE_MYSQL_8_0="yes"
+ shift ;;
--plugin)
ENABLE_PLUGIN="yes"
shift ;;
@@ -244,6 +247,11 @@ else
KOHA_ELASTICSEARCH="yes"
fi
+ if [ "$ENABLE_MYSQL_8_0" != "no" ]; then
+ echo $COMPOSE_OPTIONS
+ COMPOSE_OPTIONS="${COMPOSE_OPTIONS} -f docker-compose.mysql8.0.yml"
+ fi
+
if [ "$ENABLE_PLUGIN" != "no" ]; then
COMPOSE_OPTIONS="${COMPOSE_OPTIONS} -f docker-compose.plugin.yml"
fi
But it fails with validating [...]koha-testing-docker/docker-compose.mysql8.0.yml: services.db.environment array items[0,4] must be unique
So it collides with mariadb env vars array being already defined in docker-compose-light.yml
I trying the old way of starting KTD:
KOHA_IMAGE=master-jammy docker compose -f docker-compose-light.yml -f docker-compose.mysql8.0.yml -p koha up --force-recreate
But unsurprisingly the same error happens.
How does the CI do it? jenkins_config/build.pl seem to end up chaining docker-compose-light.yml and docker-compose.mysql8.0.yml so it should have the same outcome.