Skip to content

Commit

Permalink
feat: add support for additional mysql args
Browse files Browse the repository at this point in the history
  • Loading branch information
janosmiko committed Apr 11, 2022
1 parent 8818009 commit b42a645
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.2.34-beta
v0.2.35-beta
9 changes: 9 additions & 0 deletions docs/customization/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@ You can change the DB Server Character Set or Collation in the `.env` file:
* `MYSQL_CHARACTER_SET_SERVER=utf8mb4`
* `MYSQL_COLLATION_SERVER=utf8mb4_unicode_ci`

To configure InnoDB Buffer Pool size, add the following line to the `.env` file:

* `MYSQL_INNODB_BUFFER_POOL_SIZE=256m`

To disable Strict Mode in MySQL you will have to add the following line to the `.env` file:

* `MYSQL_DISABLE_STRICT_MODE=1`

You can also set additional arguments to `mysqld` using the setting below in the `.env` file. To add multiple arguments,
set them as a single **space separated** string. See the available arguments in
the [MariaDB Docs](https://mariadb.com/kb/en/server-system-variables/).

* `MYSQL_ARGS="--innodb-buffer-pool-instances=4 --key-buffer-size=256M"`
8 changes: 8 additions & 0 deletions templates/environments/includes/db.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ services:
{{ else }}
- --collation-server={{ .mysql_collation_server }}
{{ end }}
{{ if ne (default "" .mysql_innodb_buffer_pool_size) "" }}
- --innodb-buffer-pool-size={{ .mysql_innodb_buffer_pool_size }}
{{ end }}
{{ if ne (default "" .mysql_args) "" }}
{{ range $v := (splitList " " .mysql_args) }}
- {{ $v }}
{{ end }}
{{ end }}
{{ if isEnabledStrict .mysql_disable_strict_mode }}
- --sql-mode=
- --innodb_strict_mode=OFF
Expand Down

0 comments on commit b42a645

Please sign in to comment.