diff --git a/docker-compose.yml b/docker-compose.yml index 398c7093..0a14455e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -139,12 +139,19 @@ services: - redis-socketio-vol:/data mariadb: - image: mariadb:10.3 + image: mariadb:10.6 restart: on-failure + command: + - --character-set-server=utf8mb4 + - --collation-server=utf8mb4_unicode_ci + - --skip-character-set-client-handshake + - --skip-innodb-read-only-compressed # Temporary fix for MariaDB 10.6 environment: - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} + # Sometimes db initialization takes longer than 10 seconds and site-creator goes away. + # Frappe doesn't use CONVERT_TZ() function that requires time zone info, so we can just skip it. + - MYSQL_INITDB_SKIP_TZINFO=1 volumes: - - ./installation/frappe-mariadb.cnf:/etc/mysql/conf.d/frappe.cnf - mariadb-vol:/var/lib/mysql site-creator: diff --git a/installation/docker-compose-common.yml b/installation/docker-compose-common.yml index ede3abe1..5699ad7f 100644 --- a/installation/docker-compose-common.yml +++ b/installation/docker-compose-common.yml @@ -20,12 +20,19 @@ services: - redis-socketio-vol:/data mariadb: - image: mariadb:10.3 + image: mariadb:10.6 restart: on-failure + command: + - --character-set-server=utf8mb4 + - --collation-server=utf8mb4_unicode_ci + - --skip-character-set-client-handshake + - --skip-innodb-read-only-compressed # Temporary fix for MariaDB 10.6 environment: - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} + # Sometimes db initialization takes longer than 10 seconds and site-creator goes away. + # Frappe doesn't use CONVERT_TZ() function that requires time zone info, so we can just skip it. + - MYSQL_INITDB_SKIP_TZINFO=1 volumes: - - ./frappe-mariadb.cnf:/etc/mysql/conf.d/frappe.cnf - mariadb-vol:/var/lib/mysql volumes: diff --git a/installation/frappe-mariadb.cnf b/installation/frappe-mariadb.cnf deleted file mode 100644 index 83b2c703..00000000 --- a/installation/frappe-mariadb.cnf +++ /dev/null @@ -1,7 +0,0 @@ -[mysqld] -character-set-client-handshake = FALSE -character-set-server = utf8mb4 -collation-server = utf8mb4_unicode_ci - -[mysql] -default-character-set = utf8mb4 diff --git a/tests/pwd.yml b/tests/pwd.yml index 339900cc..7efe07ed 100644 --- a/tests/pwd.yml +++ b/tests/pwd.yml @@ -151,36 +151,21 @@ services: volumes: - sites-vol:/sites:rw - mariadb-configurator: - image: mariadb:10.3 - deploy: - restart_policy: - condition: none - command: - - "bash" - - "-c" - - > - echo -e "[mysqld]\n - skip-host-cache\n - skip-name-resolve\n - character-set-client-handshake = FALSE\n - character-set-server = utf8mb4\n - collation-server = utf8mb4_unicode_ci\n - [mysql]\n - default-character-set = utf8mb4\n - [mysqld_safe]\n - skip_log_error\n - syslog\n" > /data/frappe.cnf - volumes: - - mariadb-conf-vol:/data:rw - mariadb: - image: mariadb:10.3 + image: mariadb:10.6 deploy: restart_policy: condition: on-failure + command: + - --character-set-server=utf8mb4 + - --collation-server=utf8mb4_unicode_ci + - --skip-character-set-client-handshake + - --skip-innodb-read-only-compressed # Temporary fix for MariaDB 10.6 environment: - MYSQL_ROOT_PASSWORD=admin + # Sometimes db initialization takes longer than 10 seconds and site-creator goes away. + # Frappe doesn't use CONVERT_TZ() function that requires time zone info, so we can just skip it. + - MYSQL_INITDB_SKIP_TZINFO=1 volumes: - mariadb-conf-vol:/etc/mysql/conf.d - mariadb-vol:/var/lib/mysql