diff --git a/VERSION b/VERSION index 79a82f0..7ec1d6d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.32 +2.1.0 diff --git a/scripts/create.sh b/scripts/create.sh index 13f0e2b..074a10c 100755 --- a/scripts/create.sh +++ b/scripts/create.sh @@ -32,6 +32,19 @@ function help { $(random_quote)" } +# Wait until MySQL database is up and running +# +function waitForMySQL { + MAX_ATTEMPTS=60 + attempt=1 + until docker exec jbt-mysql mysqladmin ping -h"127.0.0.1" --silent || [ $attempt -eq $MAX_ATTEMPTS ]; do + log "Waiting for MySQL to be ready, attempt $attempt of $MAX_ATTEMPTS" + attempt=$((attempt + 1)) + sleep 1 + done + # If the MAX_ATTEMPTS are exceeded, simply try to continue. +} + # shellcheck disable=SC2207 # There are no spaces in version numbers allUsedBranches=($(getAllUsedBranches)) @@ -143,17 +156,17 @@ fi # Wait until MySQL database is up and running # (This isn't accurate when using MariaDB or PostgreSQL, but so far it's working with the delay from MySQL.) -MAX_ATTEMPTS=60 -attempt=1 -until docker exec jbt-mysql mysqladmin ping -h"127.0.0.1" --silent || [ $attempt -eq $MAX_ATTEMPTS ]; do - log "Waiting for MySQL to be ready, attempt $attempt of $MAX_ATTEMPTS" - attempt=$((attempt + 1)) - sleep 1 -done -# If the MAX_ATTEMPTS are exceeded, simply try to continue. +waitForMySQL if [ "$recreate" = false ]; then + # Disable MySQL binary logging to prevent waste of space + # see https://github.com/joomla-docker/docker-joomla/issues/197 + log "Disable MySQL binary logging" + docker exec jbt-mysql bash -c "sed -i '/^\[mysqld\]/a skip-log-bin' '/etc/my.cnf'" + docker restart jbt-mysql + waitForMySQL + # For the tests we need old-school user/password login, once over TCP and once for localhost with Unix sockets log "Enable MySQL user root login with password" docker exec jbt-mysql mysql -uroot -proot \