-
-
Save Abdess/3ed9ed1d42821d00a5cf2481870df26f to your computer and use it in GitHub Desktop.
Tutor plugin to install the latest version of MySQL and adding support of utf8mb4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DO NOT USE IN PRODUCTION | |
# | |
# Testing the latest version of MySQL with utf8mb4 charset | |
# | |
# See this conversation for further information: https://discuss.openedx.org/t/upgrading-mysql-charset-to-utf8mb4/7927 | |
# | |
# Django database connection settings had to be changed to to explicitly set charset in options: | |
# DATABASES['default']['OPTIONS']['charset'] = 'utf8mb4' | |
# How-to : | |
# https://discuss.openedx.org/t/nutmeg-upgrade-outlines-py-openedx-core-djangoapps-content-learning-sequences-models-learningcontext-doesnotexist-learningcontext-matching-query-does-not-exist/7892 | |
# | |
# Use this plugin as follows: | |
# | |
# tutor plugins install https://gist.githubusercontent.com/Abdess/3ed9ed1d42821d00a5cf2481870df26f/raw/tutor-mysql8utf8mb4.yml | |
# tutor plugins enable mysql8utf8mb4 | |
# tutor config save | |
# tutor local reboot | |
# | |
# Note: this plugin is not compatible with Kubernetes deployments. | |
name: mysql8utf8mb4 | |
version: 0.1.0 | |
config: | |
set: | |
RUN_MYSQL: false | |
patches: | |
local-docker-compose-services: | | |
# mysqlutf8mb4 | |
mysql: | |
image: docker.io/mysql:latest | |
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_0900_ai_ci | |
restart: unless-stopped | |
volumes: | |
- ../../data/mysql:/var/lib/mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: "{{ MYSQL_ROOT_PASSWORD }}" | |
mysql-permissions: | |
image: {{ DOCKER_IMAGE_PERMISSIONS }} | |
command: ["999", "/var/lib/mysql"] | |
restart: on-failure | |
volumes: | |
- ../../data/mysql:/var/lib/mysql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment