File tree Expand file tree Collapse file tree 4 files changed +45
-6
lines changed
dist/mysql/mariadb.conf.d Expand file tree Collapse file tree 4 files changed +45
-6
lines changed Original file line number Diff line number Diff line change
1
+ #
2
+ # This directory will be mounted in the 'db' service as '/etc/mysql/mariadb.conf.d'
3
+ # and read by /etc/mysql/conf.d/mariadb.cnf.
4
+ # All *.cnf files from the configuration directory will be applied to MariaDB configuration
5
+ #
6
+
7
+ [client]
8
+ #
9
+ # Default is Latin1, if you need UTF-8 set this (also in server section)
10
+ # default-character-set = utf8
11
+ #
12
+
13
+ [mysqld]
14
+ #
15
+ # * Character sets
16
+ #
17
+ # Default is Latin1, if you need UTF-8 set all this (also in client section)
18
+ #
19
+ # character_set_server = utf8
20
+ # collation_server = utf8_general_ci
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ interface BuilderInterface
56
56
public const VOLUME_MAGENTO_DEV = 'magento-dev ' ;
57
57
public const VOLUME_DOCKER_MNT = 'docker-mnt ' ;
58
58
public const VOLUME_DOCKER_ETRYPOINT = 'docker-entrypoint ' ;
59
+ public const VOLUME_MARIADB_CONF = 'mariadb-conf ' ;
59
60
60
61
public const SYNC_ENGINE_NATIVE = 'native ' ;
61
62
Original file line number Diff line number Diff line change @@ -158,14 +158,14 @@ public function getPath(): string
158
158
*/
159
159
private function getMagentoVolumes (Repository $ config ): array
160
160
{
161
- $ target = self ::DIR_MAGENTO ;
162
-
163
161
if ($ config ->get (self ::KEY_SYNC_ENGINE ) !== self ::SYNC_ENGINE_NATIVE ) {
164
- $ target .= ':nocopy ' ;
162
+ return [
163
+ self ::VOLUME_MAGENTO_SYNC . ': ' . self ::DIR_MAGENTO . ':nocopy '
164
+ ];
165
165
}
166
166
167
167
return [
168
- self ::VOLUME_MAGENTO_SYNC . ': ' . $ target . ':delegated ' ,
168
+ self ::VOLUME_MAGENTO_SYNC . ': ' . self :: DIR_MAGENTO . ':delegated ' ,
169
169
];
170
170
}
171
171
}
Original file line number Diff line number Diff line change @@ -183,7 +183,14 @@ public function build(Repository $config): Manager
183
183
'device ' => $ this ->resolver ->getRootPath ('/.docker/mysql/docker-entrypoint-initdb.d ' ),
184
184
'o ' => 'bind '
185
185
]
186
- ]
186
+ ],
187
+ self ::VOLUME_MARIADB_CONF => [
188
+ 'driver_opts ' => [
189
+ 'type ' => 'none ' ,
190
+ 'device ' => $ this ->resolver ->getRootPath ('/.docker/mysql/mariadb.conf.d ' ),
191
+ 'o ' => 'bind ' ,
192
+ ],
193
+ ],
187
194
];
188
195
189
196
if ($ this ->hasSelenium ($ config )) {
@@ -220,6 +227,16 @@ public function build(Repository $config): Manager
220
227
$ volumes [$ volumeName ] = $ syncConfig ;
221
228
}
222
229
230
+ if ($ config ->get (self ::KEY_SYNC_ENGINE ) === self ::SYNC_ENGINE_MOUNT ) {
231
+ $ volumes [self ::VOLUME_MAGENTO ] = [
232
+ 'driver_opts ' => [
233
+ 'type ' => 'none ' ,
234
+ 'device ' => $ this ->resolver ->getRootPath (),
235
+ 'o ' => 'bind '
236
+ ]
237
+ ];
238
+ }
239
+
223
240
$ manager ->addVolumes ($ volumes );
224
241
225
242
$ volumesBuild = $ this ->volumeResolver ->normalize (array_merge (
@@ -249,7 +266,8 @@ public function build(Repository $config): Manager
249
266
'volumes ' => array_merge (
250
267
[
251
268
self ::VOLUME_MAGENTO_DB . ':/var/lib/mysql ' ,
252
- self ::VOLUME_DOCKER_ETRYPOINT . ':/docker-entrypoint-initdb.d '
269
+ self ::VOLUME_DOCKER_ETRYPOINT . ':/docker-entrypoint-initdb.d ' ,
270
+ self ::VOLUME_MARIADB_CONF . ':/etc/mysql/mariadb.conf.d ' ,
253
271
],
254
272
$ volumesMount
255
273
)
You can’t perform that action at this time.
0 commit comments