-
-
Save warmos9/be1aa78ae8d01e3fe5591b112bc471c6 to your computer and use it in GitHub Desktop.
MariaDB docker-compose with UTF8 Collation and persistent data
This file contains hidden or 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
version: '3.1' | |
services: | |
db: | |
image: mariadb | |
restart: always | |
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci --init-connect='SET NAMES UTF8;' --innodb-flush-log-at-trx-commit=0 | |
ports: | |
- 3306:3306 | |
environment: | |
- MYSQL_ROOT_PASSWORD=example | |
- MYSQL_DATABASE=test | |
- MYSQL_USER=testuser | |
- MYSQL_PASSWORD=testpassword | |
volumes: | |
- ./mysqldata:/var/lib/mysql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment