@scandipwa/magento-scripts 2.0.0-alpha.0 → 2.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/lib/commands/cli.js +2 -2
  2. package/lib/commands/execute.js +1 -1
  3. package/lib/commands/import-db.js +1 -1
  4. package/lib/commands/logs.js +1 -1
  5. package/lib/commands/start.js +1 -5
  6. package/lib/config/docker.js +41 -46
  7. package/lib/config/index.js +1 -1
  8. package/lib/config/port-config.js +1 -1
  9. package/lib/config/services/elasticsearch/base-repo.js +3 -0
  10. package/lib/config/services/elasticsearch/default-es-env.js +6 -0
  11. package/lib/config/services/elasticsearch/versions/elasticsearch-6.8.js +19 -0
  12. package/lib/config/services/elasticsearch/versions/index.js +5 -0
  13. package/lib/config/templates/magentorc.template +2 -2
  14. package/lib/config/templates/mariadb.template.cnf +191 -0
  15. package/lib/config/versions/magento-2.3.0.js +2 -3
  16. package/lib/config/versions/magento-2.3.1.js +2 -3
  17. package/lib/config/versions/magento-2.3.2-p1.js +2 -3
  18. package/lib/config/versions/magento-2.3.2-p2.js +2 -3
  19. package/lib/config/versions/magento-2.3.2.js +2 -3
  20. package/lib/config/versions/magento-2.3.3-p1.js +2 -3
  21. package/lib/config/versions/magento-2.3.3.js +2 -3
  22. package/lib/config/versions/magento-2.3.4-p1.js +2 -3
  23. package/lib/config/versions/magento-2.3.4-p2.js +2 -3
  24. package/lib/config/versions/magento-2.3.4.js +2 -3
  25. package/lib/tasks/cleanup.js +1 -1
  26. package/lib/tasks/database/connect-to-database.js +117 -0
  27. package/lib/tasks/database/create-magento-database.js +18 -0
  28. package/lib/tasks/{mysql → database}/dump-theme-config.js +3 -3
  29. package/lib/tasks/{mysql → database}/fix-db.js +2 -2
  30. package/lib/tasks/{mysql/import-dump-to-mysql.js → database/import-dump-to-database.js} +20 -20
  31. package/lib/tasks/{mysql → database}/import-remote-db/index.js +0 -0
  32. package/lib/tasks/{mysql/import-remote-db/ssh/mysqldump-command.js → database/import-remote-db/ssh/database-dump-command.js} +2 -2
  33. package/lib/tasks/{mysql → database}/import-remote-db/ssh/index.js +0 -0
  34. package/lib/tasks/{mysql → database}/import-remote-db/ssh/readymage.js +4 -4
  35. package/lib/tasks/{mysql → database}/import-remote-db/ssh/regular-server.js +2 -2
  36. package/lib/tasks/{mysql → database}/index.js +2 -2
  37. package/lib/tasks/{mysql → database}/magento-tables.js +0 -0
  38. package/lib/tasks/{mysql → database}/restore-theme-config.js +4 -4
  39. package/lib/tasks/docker/convert-legacy-volumes.js +8 -7
  40. package/lib/tasks/docker/convert-mysql-to-mariadb.js +284 -0
  41. package/lib/tasks/docker/network/network-api.d.ts +1 -1
  42. package/lib/tasks/docker/project-image-builder.js +1 -1
  43. package/lib/tasks/docker/volume/index.js +8 -0
  44. package/lib/tasks/docker/{volumes.js → volume/tasks.js} +5 -19
  45. package/lib/tasks/docker/volume/volume-api.d.ts +39 -0
  46. package/lib/tasks/docker/volume/volume-api.js +66 -0
  47. package/lib/tasks/execute/index.js +5 -2
  48. package/lib/tasks/file-system/create-mariadb-config.js +23 -0
  49. package/lib/tasks/file-system/create-phpstorm-config/workspace-config/php-workspace-project-configuration-config.js +1 -1
  50. package/lib/tasks/file-system/index.js +3 -1
  51. package/lib/tasks/import-dump.js +6 -6
  52. package/lib/tasks/link.js +4 -2
  53. package/lib/tasks/magento/install-magento-project.js +1 -1
  54. package/lib/tasks/magento/setup-magento/configure-elasticsearch.js +2 -2
  55. package/lib/tasks/magento/setup-magento/create-admin.js +1 -1
  56. package/lib/tasks/magento/setup-magento/delete-admin-users.js +2 -2
  57. package/lib/tasks/magento/setup-magento/delete-customers.js +4 -4
  58. package/lib/tasks/magento/setup-magento/delete-orders.js +4 -4
  59. package/lib/tasks/magento/setup-magento/increase-admin-session-lifetime.js +2 -2
  60. package/lib/tasks/magento/setup-magento/index.js +2 -0
  61. package/lib/tasks/magento/setup-magento/install-magento.js +12 -12
  62. package/lib/tasks/magento/setup-magento/migrate-database.js +5 -11
  63. package/lib/tasks/magento/setup-magento/set-base-url.js +2 -2
  64. package/lib/tasks/magento/setup-magento/set-url-rewrite.js +2 -2
  65. package/lib/tasks/magento/setup-magento/varnish-config.js +4 -4
  66. package/lib/tasks/php/update-env-php.js +5 -3
  67. package/lib/tasks/php/update-env.php +12 -12
  68. package/lib/tasks/start.js +5 -25
  69. package/lib/tasks/status/index.js +4 -2
  70. package/lib/tasks/theme/link-theme.js +2 -2
  71. package/lib/util/config-file-validator.js +27 -13
  72. package/lib/util/database.js +7 -7
  73. package/lib/util/prefix.js +1 -1
  74. package/package.json +2 -2
  75. package/typings/context.d.ts +5 -5
  76. package/typings/index.d.ts +31 -30
  77. package/yarn-error.log +9660 -0
  78. package/lib/tasks/mysql/connect-to-mysql.js +0 -127
  79. package/lib/tasks/mysql/create-magento-database.js +0 -18
@@ -61,8 +61,8 @@ module.exports = (yargs) => {
61
61
  .addEmptyLine();
62
62
 
63
63
  block
64
- .addLine(`Connect to MySQL server: ${logger.style.command('mysql')}`)
65
- .addLine(`Connect to MySQL server as root: ${logger.style.command('mysqlroot')}`)
64
+ .addLine(`Connect to MariaDB server: ${logger.style.command('mariadb')}`)
65
+ .addLine(`Connect to MariaDB server as root: ${logger.style.command('mariadbroot')}`)
66
66
  .addEmptyLine();
67
67
 
68
68
  block.log();
@@ -18,7 +18,7 @@ module.exports = (yargs) => {
18
18
  yargs.usage(`Usage: npm run exec <container name> [commands...]
19
19
 
20
20
  Available containers:
21
- - mysql
21
+ - mariadb
22
22
  - nginx
23
23
  - redis
24
24
  - elasticsearch
@@ -8,7 +8,7 @@ const importDump = require('../tasks/import-dump');
8
8
  module.exports = (yargs) => {
9
9
  yargs.command(
10
10
  'import-db [importDb]',
11
- 'Import database dump to MySQL',
11
+ 'Import database dump to MariaDB',
12
12
  (yargs) => {
13
13
  yargs.option('remote-db', {
14
14
  alias: 'r',
@@ -14,7 +14,7 @@ module.exports = (yargs) => {
14
14
 
15
15
  Available scopes:
16
16
  - magento
17
- - mysql
17
+ - mariadb
18
18
  - redis
19
19
  - nginx
20
20
  - elasticsearch
@@ -69,10 +69,6 @@ module.exports = (yargs) => {
69
69
  type: 'boolean',
70
70
  default: false
71
71
  })
72
- .option('import-db', {
73
- describe: 'Import database dump to MySQL',
74
- type: 'string'
75
- })
76
72
  .option('edition', {
77
73
  alias: 'e',
78
74
  describe: 'Magento Edition to install',
@@ -169,7 +165,7 @@ module.exports = (yargs) => {
169
165
  block.log();
170
166
 
171
167
  logger.note(
172
- `MySQL credentials, containers status and project information available in ${logger.style.code('npm run status')} command.
168
+ `MariaDB credentials, containers status and project information available in ${logger.style.code('npm run status')} command.
173
169
  To access Magento CLI, Composer and PHP for this project use ${logger.style.code('npm run cli')} command.`
174
170
  );
175
171
  logger.log('');
@@ -4,6 +4,8 @@ const getPhpConfig = require('./php-config');
4
4
  const { isIpAddress } = require('../util/ip');
5
5
 
6
6
  const systeminformation = require('systeminformation');
7
+ const { deepmerge } = require('../util/deepmerge');
8
+ const defaultEsEnv = require('./services/elasticsearch/default-es-env');
7
9
 
8
10
  /**
9
11
  *
@@ -30,21 +32,24 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
30
32
  cacheDir
31
33
  } = baseConfig;
32
34
 
33
- const cpuSupportedFlags = await systeminformation.cpuFlags();
35
+ const cpuSupportedFlags = (await systeminformation.cpuFlags()).split(' ');
34
36
 
35
37
  const network = {
36
38
  name: `${ prefix }_network`
37
39
  };
38
40
 
39
41
  const volumes = {
40
- mysql: {
41
- name: `${ prefix }_mysql-data`
42
+ mariadb: {
43
+ name: `${ prefix }_mariadb-data`
42
44
  },
43
45
  redis: {
44
46
  name: `${ prefix }_redis-data`
45
47
  },
46
48
  elasticsearch: {
47
49
  name: `${ prefix }_elasticsearch-data`
50
+ },
51
+ composer_home: {
52
+ name: 'composer_home-data'
48
53
  }
49
54
  };
50
55
 
@@ -59,7 +64,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
59
64
  */
60
65
  volumes.php = {
61
66
  name: `${ prefix }_project-data`,
62
- opts: {
67
+ opt: {
63
68
  type: 'nfs',
64
69
  device: path.join(magentoDir),
65
70
  o: 'bind'
@@ -67,7 +72,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
67
72
  };
68
73
  volumes.nginx = {
69
74
  name: `${ prefix }_nginx-data`,
70
- opts: {
75
+ opt: {
71
76
  type: 'nfs',
72
77
  device: path.join(cacheDir, 'nginx', 'conf.d'),
73
78
  o: 'bind'
@@ -75,7 +80,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
75
80
  };
76
81
  volumes.appPub = {
77
82
  name: `${ prefix }_pub-data`,
78
- opts: {
83
+ opt: {
79
84
  type: 'nfs',
80
85
  device: path.join(magentoDir, 'pub'),
81
86
  o: 'bind'
@@ -83,7 +88,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
83
88
  };
84
89
  volumes.appSetup = {
85
90
  name: `${ prefix }_setup-data`,
86
- opts: {
91
+ opt: {
87
92
  type: 'nfs',
88
93
  device: path.join(magentoDir, 'setup'),
89
94
  o: 'bind'
@@ -91,7 +96,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
91
96
  };
92
97
  volumes.sslTerminator = {
93
98
  name: `${ prefix }_ssl-terminator-data`,
94
- opts: {
99
+ opt: {
95
100
  type: 'nfs',
96
101
  device: path.join(cacheDir, 'ssl-terminator', 'conf.d'),
97
102
  o: 'bind'
@@ -101,7 +106,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
101
106
  if (varnish.enabled) {
102
107
  volumes.varnish = {
103
108
  name: `${ prefix }_varnish-data`,
104
- opts: {
109
+ opt: {
105
110
  type: 'nfs',
106
111
  device: path.join(cacheDir, 'varnish'),
107
112
  o: 'bind'
@@ -128,11 +133,13 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
128
133
  network: isNotNativeLinux ? network.name : 'host',
129
134
  mountVolumes: [
130
135
  `${ isLinux ? magentoDir : volumes.php.name }:${containerMagentoDir}`,
136
+ `${ volumes.composer_home.name }:/composer/home`,
131
137
  `${ php.iniPath }:/usr/local/etc/php/php.ini`,
132
138
  `${ php.fpmConfPath }:/usr/local/etc/php-fpm.d/zz-docker.conf`
133
139
  ],
134
140
  env: {
135
- COMPOSER_AUTH: process.env.COMPOSER_AUTH || ''
141
+ COMPOSER_AUTH: process.env.COMPOSER_AUTH || '',
142
+ COMPOSER_HOME: '/composer/home'
136
143
  },
137
144
  restart: 'on-failure:5',
138
145
  image: `local-cma-project:${ prefix }`,
@@ -166,7 +173,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
166
173
  ],
167
174
  restart: 'on-failure:5',
168
175
  network: isNotNativeLinux ? network.name : 'host',
169
- image: `nginx:${ nginx.version }`,
176
+ image: `${ nginx.version ? `nginx:${ nginx.version }` : nginx.image }`,
170
177
  name: `${ prefix }_ssl-terminator`,
171
178
  command: "nginx -g 'daemon off;'"
172
179
  },
@@ -198,7 +205,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
198
205
  restart: 'on-failure:5',
199
206
  // TODO: use connect instead
200
207
  network: isNotNativeLinux ? network.name : 'host',
201
- image: `nginx:${ nginx.version }`,
208
+ image: `${ nginx.version ? `nginx:${ nginx.version }` : nginx.image }`,
202
209
  name: `${ prefix }_nginx`,
203
210
  command: "nginx -g 'daemon off;'"
204
211
  },
@@ -212,47 +219,37 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
212
219
  mounts: [`source=${ volumes.redis.name },target=/data`],
213
220
  // TODO: use connect instead
214
221
  network: network.name,
215
- image: `redis:${ redis.version }`,
216
- imageDetails: {
217
- name: 'redis',
218
- tag: redis.version
219
- },
222
+ image: `${ redis.version ? `redis:${ redis.version }` : redis.image }`,
220
223
  name: `${ prefix }_redis`,
221
224
  connectCommand: ['redis-cli']
222
225
  },
223
- mysql: {
226
+ mariadb: {
224
227
  _: 'MariaDB',
225
228
  healthCheck: {
226
229
  cmd: 'mysqladmin ping --silent'
227
230
  },
228
- ports: [`127.0.0.1:${ ports.mysql }:3306`],
229
- forwardedPorts: [`127.0.0.1:${ ports.mysql }:3306`],
230
- mounts: [`source=${ volumes.mysql.name },target=/var/lib/mysql`],
231
+ ports: [`127.0.0.1:${ ports.mariadb }:3306`],
232
+ forwardedPorts: [`127.0.0.1:${ ports.mariadb }:3306`],
233
+ mountVolumes: [
234
+ `${ volumes.mariadb.name }:/var/lib/mysql`,
235
+ `${ path.join(baseConfig.cacheDir, 'mariadb.cnf') }:/etc/mysql/my.cnf`
236
+ ],
231
237
  env: {
232
- MYSQL_PORT: 3306,
233
- MYSQL_ROOT_PASSWORD: 'scandipwa',
234
- MYSQL_USER: 'magento',
235
- MYSQL_PASSWORD: 'magento',
236
- MYSQL_DATABASE: 'magento'
238
+ MARIADB_PORT: 3306,
239
+ MARIADB_ROOT_PASSWORD: 'scandipwa',
240
+ MARIADB_USER: 'magento',
241
+ MARIADB_PASSWORD: 'magento',
242
+ MARIADB_DATABASE: 'magento'
237
243
  },
238
- /**
239
- * When database dump contains functions, MySQL can throw and error "access denied for those functions"
240
- * so to overcome this issue, we need to enable trust option for these functions to avoid errors during migrations.
241
- *
242
- * Documentation reference: https://dev.mysql.com/doc/refman/5.7/en/stored-programs-logging.html
243
- */
244
244
  command: [
245
- '--log_bin_trust_function_creators=1',
246
- '--default-authentication-plugin=mysql_native_password',
247
- '--max_allowed_packet=1GB',
248
- '--bind-address=0.0.0.0'
245
+ '--log_bin_trust_function_creators=1'
249
246
  ]
250
247
  .join(' '),
251
248
  securityOptions: [
252
249
  'seccomp=unconfined'
253
250
  ],
254
251
  network: network.name,
255
- image: `mariadb:${ mariadb.version }`,
252
+ image: `${ mariadb.version ? `mariadb:${ mariadb.version }` : mariadb.image }`,
256
253
  name: `${ prefix }_mariadb`
257
254
  },
258
255
  elasticsearch: {
@@ -263,16 +260,14 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
263
260
  ports: [`127.0.0.1:${ ports.elasticsearch }:9200`],
264
261
  forwardedPorts: [`127.0.0.1:${ ports.elasticsearch }:9200`],
265
262
  mounts: [`source=${ volumes.elasticsearch.name },target=/usr/share/elasticsearch/data`],
266
- env: {
267
- 'bootstrap.memory_lock': true,
268
- 'xpack.security.enabled': false,
269
- 'discovery.type': 'single-node',
270
- ES_JAVA_OPTS: '-Xms512m -Xmx512m',
263
+ env: deepmerge(
264
+ {
271
265
  // https://www.elastic.co/guide/en/elasticsearch/reference/master/ml-settings.html
272
- 'xpack.ml.enabled': ['sse4.2', 'sse4_2'].some((sse42Flag) => cpuSupportedFlags.includes(sse42Flag))
273
- },
266
+ 'xpack.ml.enabled': ['sse4.2', 'sse4_2'].some((sse42Flag) => cpuSupportedFlags.includes(sse42Flag))
267
+ }, elasticsearch.env || defaultEsEnv
268
+ ),
274
269
  network: network.name,
275
- image: `elasticsearch:${ elasticsearch.version }`,
270
+ image: `${ elasticsearch.version ? `elasticsearch:${ elasticsearch.version }` : elasticsearch.image }`,
276
271
  name: `${ prefix }_elasticsearch`
277
272
  }
278
273
  };
@@ -286,7 +281,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
286
281
  if (!ctx.debug && varnish.enabled) {
287
282
  dockerConfig.varnish = {
288
283
  _: 'Varnish',
289
- image: `varnish:${ varnish.version }`,
284
+ image: `${ varnish.version ? `varnish:${ varnish.version }` : varnish.image }`,
290
285
  name: `${ prefix }_varnish`,
291
286
  mountVolumes: [
292
287
  `${ isLinux ? path.join(cacheDir, 'varnish') : volumes.varnish.name }:/etc/varnish`
@@ -19,7 +19,7 @@ const darwinMinimalVersion = '10.5';
19
19
  const getBaseConfig = (projectPath = process.cwd(), prefix = folderName) => ({
20
20
  prefix: getPrefix(prefix),
21
21
  magentoDir: projectPath,
22
- containerMagentoDir: '/var/www/html',
22
+ containerMagentoDir: projectPath,
23
23
  templateDir: path.join(__dirname, 'templates'),
24
24
  cacheDir: path.join(projectPath, 'node_modules', '.create-magento-app-cache')
25
25
  });
@@ -58,7 +58,7 @@ const defaultPorts = {
58
58
  varnish: 8080,
59
59
  sslTerminator: 80,
60
60
  fpm: 9000,
61
- mysql: 3306,
61
+ mariadb: 3306,
62
62
  redis: 6379,
63
63
  elasticsearch: 9200
64
64
  };
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ repo: 'ghcr.io/scandipwa/create-magento-app'
3
+ };
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ 'bootstrap.memory_lock': true,
3
+ 'xpack.security.enabled': false,
4
+ 'discovery.type': 'single-node',
5
+ ES_JAVA_OPTS: '-Xms512m -Xmx512m'
6
+ };
@@ -0,0 +1,19 @@
1
+ const os = require('os');
2
+ const { getArchSync } = require('../../../../util/arch');
3
+ const { deepmerge } = require('../../../../util/deepmerge');
4
+ const { repo } = require('../base-repo');
5
+ const defaultEnv = require('../default-es-env');
6
+
7
+ /**
8
+ * @returns {import('../../../../../typings/index').ServiceWithImage}
9
+ */
10
+ const elasticsearch68 = ({
11
+ image = `${ repo }:elasticsearch-6.8`
12
+ } = {}) => ({
13
+ image,
14
+ env: deepmerge(defaultEnv, os.platform() === 'darwin' && getArchSync() === 'arm64' ? {
15
+ 'xpack.ml.enabled': false
16
+ } : {})
17
+ });
18
+
19
+ module.exports = elasticsearch68;
@@ -0,0 +1,5 @@
1
+ const elasticsearch68 = require('./elasticsearch-6.8');
2
+
3
+ module.exports = {
4
+ elasticsearch68
5
+ };
@@ -11,7 +11,7 @@ alias c="composer"
11
11
  <% if (it.varnishEnabled) { %>
12
12
  alias cvc="npm run exec varnish varnishadm ban req.url '~ /' && echo 'Varnish cache cleared!'"
13
13
  <% } %>
14
- alias mysql="npm run exec mysql 'mysql -umagento -pmagento'"
15
- alias mysqlroot="npm run exec mysql 'mysql -uroot -pscandipwa'"
14
+ alias mariadb="npm run exec mariadb 'mysql -umagento -pmagento'"
15
+ alias mariadbroot="npm run exec mariadb 'mysql -uroot -pscandipwa'"
16
16
 
17
17
  export BASH_SILENCE_DEPRECATION_WARNING=1
@@ -0,0 +1,191 @@
1
+ # MariaDB database server configuration file.
2
+ #
3
+ # You can copy this file to one of:
4
+ # - "/etc/mysql/my.cnf" to set global options,
5
+ # - "~/.my.cnf" to set user-specific options.
6
+ #
7
+ # One can use all long options that the program supports.
8
+ # Run program with --help to get a list of available options and with
9
+ # --print-defaults to see which it would actually understand and use.
10
+ #
11
+ # For explanations see
12
+ # http://dev.mysql.com/doc/mysql/en/server-system-variables.html
13
+
14
+ # This will be passed to all mysql clients
15
+ # It has been reported that passwords should be enclosed with ticks/quotes
16
+ # escpecially if they contain "#" chars...
17
+ # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
18
+ [client]
19
+ port = 3306
20
+ socket = /var/run/mysqld/mysqld.sock
21
+
22
+ # Here is entries for some specific programs
23
+ # The following values assume you have at least 32M ram
24
+
25
+ # This was formally known as [safe_mysqld]. Both versions are currently parsed.
26
+ [mysqld_safe]
27
+ socket = /var/run/mysqld/mysqld.sock
28
+ nice = 0
29
+
30
+ [mysqld]
31
+ #
32
+ # * Basic Settings
33
+ #
34
+ #user = mysql
35
+ pid-file = /var/run/mysqld/mysqld.pid
36
+ socket = /var/run/mysqld/mysqld.sock
37
+ port = 3306
38
+ basedir = /usr
39
+ datadir = /var/lib/mysql
40
+ tmpdir = /tmp
41
+ lc_messages_dir = /usr/share/mysql
42
+ lc_messages = en_US
43
+ skip-external-locking
44
+ #q
45
+ # Instead of skip-networking the default is now to listen only on
46
+ # localhost which is more compatible and is not less secure.
47
+ # bind-address = 0.0.0.0
48
+ #
49
+ # * Fine Tuning
50
+ #
51
+ max_connections = 100
52
+ connect_timeout = 200
53
+ wait_timeout = 28800
54
+ max_allowed_packet = 1GB
55
+ thread_cache_size = 128
56
+ sort_buffer_size = 4M
57
+ bulk_insert_buffer_size = 16M
58
+ tmp_table_size = 32M
59
+ max_heap_table_size = 32M
60
+ #
61
+ # * MyISAM
62
+ #
63
+ # This replaces the startup script and checks MyISAM tables if needed
64
+ # the first time they are touched. On error, make copy and try a repair.
65
+ myisam_recover_options = BACKUP
66
+ key_buffer_size = 128M
67
+ #open-files-limit = 2000
68
+ table_open_cache = 400
69
+ myisam_sort_buffer_size = 512M
70
+ concurrent_insert = 2
71
+ read_buffer_size = 2M
72
+ read_rnd_buffer_size = 1M
73
+ #
74
+ # * Query Cache Configuration
75
+ #
76
+ # Cache only tiny result sets, so we can fit more in the query cache.
77
+ query_cache_limit = 128K
78
+ query_cache_size = 64M
79
+ # for more write intensive setups, set to DEMAND or OFF
80
+ #query_cache_type = DEMAND
81
+ #
82
+ # * Logging and Replication
83
+ #
84
+ # Both location gets rotated by the cronjob.
85
+ # Be aware that this log type is a performance killer.
86
+ # As of 5.1 you can enable the log at runtime!
87
+ #general_log_file = /var/log/mysql/mysql.log
88
+ #general_log = 1
89
+ #
90
+ # Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
91
+ #
92
+ # we do want to know about network errors and such
93
+ #log_warnings = 2
94
+ #
95
+ # Enable the slow query log to see queries with especially long duration
96
+ #slow_query_log[={0|1}]
97
+ slow_query_log_file = /var/log/mysql/mariadb-slow.log
98
+ long_query_time = 10
99
+ #log_slow_rate_limit = 1000
100
+ #log_slow_verbosity = query_plan
101
+
102
+ #log-queries-not-using-indexes
103
+ #log_slow_admin_statements
104
+ #
105
+ # The following can be used as easy to replay backup logs or for replication.
106
+ # note: if you are setting up a replication slave, see README.Debian about
107
+ # other settings you may need to change.
108
+ #server-id = 1
109
+ #report_host = master1
110
+ #auto_increment_increment = 2
111
+ #auto_increment_offset = 1
112
+ #log_bin = /var/log/mysql/mariadb-bin
113
+ #log_bin_index = /var/log/mysql/mariadb-bin.index
114
+ # not fab for performance, but safer
115
+ #sync_binlog = 1
116
+ expire_logs_days = 10
117
+ max_binlog_size = 100M
118
+ # slaves
119
+ #relay_log = /var/log/mysql/relay-bin
120
+ #relay_log_index = /var/log/mysql/relay-bin.index
121
+ #relay_log_info_file = /var/log/mysql/relay-bin.info
122
+ #log_slave_updates
123
+ #read_only
124
+ #
125
+ # If applications support it, this stricter sql_mode prevents some
126
+ # mistakes like inserting invalid dates etc.
127
+ #sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL
128
+ #
129
+ # * InnoDB
130
+ #
131
+ # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
132
+ # Read the manual for more InnoDB related options. There are many!
133
+ default_storage_engine = InnoDB
134
+ innodb_buffer_pool_size = 256M
135
+ innodb_log_buffer_size = 8M
136
+ innodb_file_per_table = 1
137
+ innodb_open_files = 400
138
+ innodb_io_capacity = 400
139
+ innodb_flush_method = O_DIRECT
140
+ #
141
+ # * Security Features
142
+ #
143
+ # Read the manual, too, if you want chroot!
144
+ # chroot = /var/lib/mysql/
145
+ #
146
+ # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
147
+ #
148
+ # ssl-ca=/etc/mysql/cacert.pem
149
+ # ssl-cert=/etc/mysql/server-cert.pem
150
+ # ssl-key=/etc/mysql/server-key.pem
151
+
152
+ #
153
+ # * Galera-related settings
154
+ #
155
+ [galera]
156
+ # Mandatory settings
157
+ #wsrep_on=ON
158
+ #wsrep_provider=
159
+ #wsrep_cluster_address=
160
+ #binlog_format=row
161
+ #default_storage_engine=InnoDB
162
+ #innodb_autoinc_lock_mode=2
163
+ #
164
+ # Allow server to accept connections on all interfaces.
165
+ #
166
+ #bind-address=0.0.0.0
167
+ #
168
+ # Optional setting
169
+ #wsrep_slave_threads=1
170
+ #innodb_flush_log_at_trx_commit=0
171
+
172
+ [mysqldump]
173
+ quick
174
+ quote-names
175
+ max_allowed_packet = 16M
176
+
177
+ [mysql]
178
+ #no-auto-rehash # faster start of mysql but no tab completion
179
+
180
+ [isamchk]
181
+ key_buffer = 16M
182
+
183
+ #
184
+ # * IMPORTANT: Additional settings that can override those from this file!
185
+ # The files must end with '.cnf', otherwise they'll be ignored.
186
+ #
187
+ [mariadb]
188
+ skip-host-cache
189
+ skip-name-resolve
190
+
191
+ !includedir /etc/mysql/conf.d/
@@ -3,6 +3,7 @@ const { defaultMagentoConfig } = require('../magento-config');
3
3
  const { magento23PHPExtensionList } = require('../magento/required-php-extensions');
4
4
  const { repo } = require('../php/base-repo');
5
5
  const { php72 } = require('../php/versions');
6
+ const { elasticsearch68 } = require('../services/elasticsearch/versions');
6
7
  const { sslTerminator } = require('../ssl-terminator');
7
8
  const { varnish66 } = require('../varnish/varnish-6-6');
8
9
 
@@ -27,9 +28,7 @@ module.exports = ({ templateDir } = {}) => ({
27
28
  mariadb: {
28
29
  version: '10.2'
29
30
  },
30
- elasticsearch: {
31
- version: '5.6.16'
32
- },
31
+ elasticsearch: elasticsearch68(),
33
32
  composer: {
34
33
  version: '1'
35
34
  },
@@ -1,4 +1,5 @@
1
1
  const path = require('path');
2
+ const { elasticsearch68 } = require('../services/elasticsearch/versions');
2
3
  const { defaultMagentoConfig } = require('../magento-config');
3
4
  const { magento23PHPExtensionList } = require('../magento/required-php-extensions');
4
5
  const { repo } = require('../php/base-repo');
@@ -27,9 +28,7 @@ module.exports = ({ templateDir } = {}) => ({
27
28
  mariadb: {
28
29
  version: '10.2'
29
30
  },
30
- elasticsearch: {
31
- version: '6.8.16'
32
- },
31
+ elasticsearch: elasticsearch68(),
33
32
  composer: {
34
33
  version: '1'
35
34
  },
@@ -1,4 +1,5 @@
1
1
  const path = require('path');
2
+ const { elasticsearch68 } = require('../services/elasticsearch/versions');
2
3
  const { defaultMagentoConfig } = require('../magento-config');
3
4
  const { magento23PHPExtensionList } = require('../magento/required-php-extensions');
4
5
  const { repo } = require('../php/base-repo');
@@ -27,9 +28,7 @@ module.exports = ({ templateDir } = {}) => ({
27
28
  mariadb: {
28
29
  version: '10.2'
29
30
  },
30
- elasticsearch: {
31
- version: '6.8.16'
32
- },
31
+ elasticsearch: elasticsearch68(),
33
32
  composer: {
34
33
  version: '1'
35
34
  },
@@ -1,4 +1,5 @@
1
1
  const path = require('path');
2
+ const { elasticsearch68 } = require('../services/elasticsearch/versions');
2
3
  const { defaultMagentoConfig } = require('../magento-config');
3
4
  const { magento23PHPExtensionList } = require('../magento/required-php-extensions');
4
5
  const { repo } = require('../php/base-repo');
@@ -27,9 +28,7 @@ module.exports = ({ templateDir } = {}) => ({
27
28
  mariadb: {
28
29
  version: '10.2'
29
30
  },
30
- elasticsearch: {
31
- version: '6.8.16'
32
- },
31
+ elasticsearch: elasticsearch68(),
33
32
  composer: {
34
33
  version: '1'
35
34
  },
@@ -1,4 +1,5 @@
1
1
  const path = require('path');
2
+ const { elasticsearch68 } = require('../services/elasticsearch/versions');
2
3
  const { defaultMagentoConfig } = require('../magento-config');
3
4
  const { magento23PHPExtensionList } = require('../magento/required-php-extensions');
4
5
  const { repo } = require('../php/base-repo');
@@ -27,9 +28,7 @@ module.exports = ({ templateDir } = {}) => ({
27
28
  mariadb: {
28
29
  version: '10.2'
29
30
  },
30
- elasticsearch: {
31
- version: '6.8.16'
32
- },
31
+ elasticsearch: elasticsearch68(),
33
32
  composer: {
34
33
  version: '1'
35
34
  },
@@ -1,4 +1,5 @@
1
1
  const path = require('path');
2
+ const { elasticsearch68 } = require('../services/elasticsearch/versions');
2
3
  const { defaultMagentoConfig } = require('../magento-config');
3
4
  const { magento23PHPExtensionList } = require('../magento/required-php-extensions');
4
5
  const { repo } = require('../php/base-repo');
@@ -27,9 +28,7 @@ module.exports = ({ templateDir } = {}) => ({
27
28
  mariadb: {
28
29
  version: '10.2'
29
30
  },
30
- elasticsearch: {
31
- version: '6.8.16'
32
- },
31
+ elasticsearch: elasticsearch68(),
33
32
  composer: {
34
33
  version: '1'
35
34
  },
@@ -1,4 +1,5 @@
1
1
  const path = require('path');
2
+ const { elasticsearch68 } = require('../services/elasticsearch/versions');
2
3
  const { defaultMagentoConfig } = require('../magento-config');
3
4
  const { magento23PHPExtensionList } = require('../magento/required-php-extensions');
4
5
  const { repo } = require('../php/base-repo');
@@ -27,9 +28,7 @@ module.exports = ({ templateDir } = {}) => ({
27
28
  mariadb: {
28
29
  version: '10.2'
29
30
  },
30
- elasticsearch: {
31
- version: '6.8.16'
32
- },
31
+ elasticsearch: elasticsearch68(),
33
32
  composer: {
34
33
  version: '1'
35
34
  },