Skip to content

Commit

Permalink
Update mysql to use bitnami
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h-abid committed Oct 18, 2024
1 parent 4a5bae0 commit 1457a97
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ MAILDEV_IMAGE_TAG=2.1.0
MAILHOG_IMAGE_TAG=v1.0.1
MINIO_CLIENT_IMAGE_TAG=RELEASE.2022-12-24T15-21-38Z
MINIO_IMAGE_TAG=RELEASE.2023-01-02T09-40-09Z
MYSQL_IMAGE_TAG=9.0.1
MYSQL_IMAGE_TAG=8.4.3
ORACLE_IMAGE_TAG=11.2.0.2-slim
PORTAINER_IMAGE_TAG=2.16.2
RABBITMQ_IMAGE_TAG=3.12.1-management
Expand Down
11 changes: 11 additions & 0 deletions mysql/.example.env
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# https://github.com/bitnami/containers/blob/main/bitnami/mysql/README.md#environment-variables

MYSQL_ROOT_PASSWORD=secret
MYSQL_REPLICATION_USER=slaveuser
MYSQL_REPLICATION_PASSWORD=slavepass
MYSQL_REPLICATION_MODE=master
MYSQL_CHARACTER_SET=utf8mb4
MYSQL_COLLATE=utf8mb4_0900_ai_ci
MYSQL_ENABLE_SLOW_QUERY=0
MYSQL_LONG_QUERY_TIME=2
# MYSQL_EXTRA_FLAGS=
# MYSQL_SQL_MODE=
1 change: 1 addition & 0 deletions mysql/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/data
/my_custom.cnf
15 changes: 5 additions & 10 deletions mysql/compose.mysql.example.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
volumes:
common-mysql-db:
name: 'common-mysql-db'
common-mysql:
name: 'common-mysql'

services:
mysql:
image: 'mysql:${MYSQL_IMAGE_TAG:-9.0.1}'
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_0900_ai_ci
- --default-authentication-plugin=mysql_native_password
- --local-infile=1
- --secure-file-priv=/sqls
image: 'bitnami/mysql:${MYSQL_IMAGE_TAG:-8.4.3}'
env_file:
- .env
networks:
Expand All @@ -20,6 +14,7 @@ services:
# ports:
# - 127.0.0.1:${MYSQL_PUBLISH_PORT:-3306}:3306
volumes:
- common-mysql-db:/var/lib/mysql
- common-mysql:/var/lib/mysql
- ./my_custom.cnf:/opt/bitnami/mysql/conf/my_custom.cnf:ro
- ./sqls:/sqls
- ./csvs:/csvs
5 changes: 5 additions & 0 deletions mysql/my_custom.example.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[mysql]
local-infile=1

[mysqld]
secure-file-priv=""
7 changes: 7 additions & 0 deletions mysql/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# MySQL

A Popular Relational Database Management System.

<u>Reference:</u>
* [Official MySQL Documentation](https://dev.mysql.com/doc/relnotes/mysql/8.4/en/news-8-4-3.html)
* [Bitnami MySQL](https://github.com/bitnami/containers/blob/main/bitnami/mysql/README.md)

0 comments on commit 1457a97

Please sign in to comment.