@scandipwa/magento-scripts 2.0.0-alpha.0 → 2.0.0-alpha.1
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.
- package/lib/commands/cli.js +2 -2
- package/lib/commands/execute.js +1 -1
- package/lib/commands/import-db.js +1 -1
- package/lib/commands/logs.js +1 -1
- package/lib/commands/start.js +1 -5
- package/lib/config/docker.js +37 -45
- package/lib/config/index.js +1 -1
- package/lib/config/port-config.js +1 -1
- package/lib/config/services/elasticsearch/base-repo.js +3 -0
- package/lib/config/services/elasticsearch/versions/elasticsearch-6.8.js +23 -0
- package/lib/config/services/elasticsearch/versions/index.js +5 -0
- package/lib/config/templates/magentorc.template +2 -2
- package/lib/config/templates/mariadb.template.cnf +191 -0
- package/lib/config/versions/magento-2.3.0.js +2 -3
- package/lib/config/versions/magento-2.3.1.js +2 -3
- package/lib/config/versions/magento-2.3.2-p1.js +2 -3
- package/lib/config/versions/magento-2.3.2-p2.js +2 -3
- package/lib/config/versions/magento-2.3.2.js +2 -3
- package/lib/config/versions/magento-2.3.3-p1.js +2 -3
- package/lib/config/versions/magento-2.3.3.js +2 -3
- package/lib/config/versions/magento-2.3.4-p1.js +2 -3
- package/lib/config/versions/magento-2.3.4-p2.js +2 -3
- package/lib/config/versions/magento-2.3.4.js +2 -3
- package/lib/tasks/cleanup.js +1 -1
- package/lib/tasks/database/connect-to-database.js +117 -0
- package/lib/tasks/database/create-magento-database.js +18 -0
- package/lib/tasks/{mysql → database}/dump-theme-config.js +3 -3
- package/lib/tasks/{mysql → database}/fix-db.js +2 -2
- package/lib/tasks/{mysql/import-dump-to-mysql.js → database/import-dump-to-database.js} +20 -20
- package/lib/tasks/{mysql → database}/import-remote-db/index.js +0 -0
- package/lib/tasks/{mysql/import-remote-db/ssh/mysqldump-command.js → database/import-remote-db/ssh/database-dump-command.js} +2 -2
- package/lib/tasks/{mysql → database}/import-remote-db/ssh/index.js +0 -0
- package/lib/tasks/{mysql → database}/import-remote-db/ssh/readymage.js +4 -4
- package/lib/tasks/{mysql → database}/import-remote-db/ssh/regular-server.js +2 -2
- package/lib/tasks/{mysql → database}/index.js +2 -2
- package/lib/tasks/{mysql → database}/magento-tables.js +0 -0
- package/lib/tasks/{mysql → database}/restore-theme-config.js +4 -4
- package/lib/tasks/docker/convert-legacy-volumes.js +8 -7
- package/lib/tasks/docker/convert-mysql-to-mariadb.js +284 -0
- package/lib/tasks/docker/network/network-api.d.ts +1 -1
- package/lib/tasks/docker/project-image-builder.js +1 -1
- package/lib/tasks/docker/volume/index.js +8 -0
- package/lib/tasks/docker/{volumes.js → volume/tasks.js} +5 -19
- package/lib/tasks/docker/volume/volume-api.d.ts +39 -0
- package/lib/tasks/docker/volume/volume-api.js +66 -0
- package/lib/tasks/execute/index.js +5 -2
- package/lib/tasks/file-system/create-mariadb-config.js +23 -0
- package/lib/tasks/file-system/index.js +3 -1
- package/lib/tasks/import-dump.js +6 -6
- package/lib/tasks/link.js +4 -2
- package/lib/tasks/magento/install-magento-project.js +1 -1
- package/lib/tasks/magento/setup-magento/configure-elasticsearch.js +2 -2
- package/lib/tasks/magento/setup-magento/create-admin.js +1 -1
- package/lib/tasks/magento/setup-magento/delete-admin-users.js +2 -2
- package/lib/tasks/magento/setup-magento/delete-customers.js +4 -4
- package/lib/tasks/magento/setup-magento/delete-orders.js +4 -4
- package/lib/tasks/magento/setup-magento/increase-admin-session-lifetime.js +2 -2
- package/lib/tasks/magento/setup-magento/index.js +2 -0
- package/lib/tasks/magento/setup-magento/install-magento.js +12 -12
- package/lib/tasks/magento/setup-magento/migrate-database.js +5 -11
- package/lib/tasks/magento/setup-magento/set-base-url.js +2 -2
- package/lib/tasks/magento/setup-magento/set-url-rewrite.js +2 -2
- package/lib/tasks/magento/setup-magento/varnish-config.js +4 -4
- package/lib/tasks/php/update-env-php.js +5 -3
- package/lib/tasks/php/update-env.php +12 -12
- package/lib/tasks/start.js +5 -25
- package/lib/tasks/status/index.js +4 -2
- package/lib/tasks/theme/link-theme.js +2 -2
- package/lib/util/config-file-validator.js +27 -13
- package/lib/util/database.js +7 -7
- package/lib/util/prefix.js +1 -1
- package/package.json +2 -2
- package/typings/context.d.ts +5 -5
- package/typings/index.d.ts +31 -30
- package/yarn-error.log +9660 -0
- package/lib/tasks/mysql/connect-to-mysql.js +0 -127
- package/lib/tasks/mysql/create-magento-database.js +0 -18
package/lib/commands/cli.js
CHANGED
|
@@ -61,8 +61,8 @@ module.exports = (yargs) => {
|
|
|
61
61
|
.addEmptyLine();
|
|
62
62
|
|
|
63
63
|
block
|
|
64
|
-
.addLine(`Connect to
|
|
65
|
-
.addLine(`Connect to
|
|
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();
|
package/lib/commands/execute.js
CHANGED
package/lib/commands/logs.js
CHANGED
package/lib/commands/start.js
CHANGED
|
@@ -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
|
-
`
|
|
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('');
|
package/lib/config/docker.js
CHANGED
|
@@ -4,6 +4,7 @@ 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');
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
*
|
|
@@ -30,21 +31,24 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
|
|
|
30
31
|
cacheDir
|
|
31
32
|
} = baseConfig;
|
|
32
33
|
|
|
33
|
-
const cpuSupportedFlags = await systeminformation.cpuFlags();
|
|
34
|
+
const cpuSupportedFlags = (await systeminformation.cpuFlags()).split(' ');
|
|
34
35
|
|
|
35
36
|
const network = {
|
|
36
37
|
name: `${ prefix }_network`
|
|
37
38
|
};
|
|
38
39
|
|
|
39
40
|
const volumes = {
|
|
40
|
-
|
|
41
|
-
name: `${ prefix }
|
|
41
|
+
mariadb: {
|
|
42
|
+
name: `${ prefix }_mariadb-data`
|
|
42
43
|
},
|
|
43
44
|
redis: {
|
|
44
45
|
name: `${ prefix }_redis-data`
|
|
45
46
|
},
|
|
46
47
|
elasticsearch: {
|
|
47
48
|
name: `${ prefix }_elasticsearch-data`
|
|
49
|
+
},
|
|
50
|
+
composer_home: {
|
|
51
|
+
name: 'composer_home-data'
|
|
48
52
|
}
|
|
49
53
|
};
|
|
50
54
|
|
|
@@ -59,7 +63,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
|
|
|
59
63
|
*/
|
|
60
64
|
volumes.php = {
|
|
61
65
|
name: `${ prefix }_project-data`,
|
|
62
|
-
|
|
66
|
+
opt: {
|
|
63
67
|
type: 'nfs',
|
|
64
68
|
device: path.join(magentoDir),
|
|
65
69
|
o: 'bind'
|
|
@@ -67,7 +71,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
|
|
|
67
71
|
};
|
|
68
72
|
volumes.nginx = {
|
|
69
73
|
name: `${ prefix }_nginx-data`,
|
|
70
|
-
|
|
74
|
+
opt: {
|
|
71
75
|
type: 'nfs',
|
|
72
76
|
device: path.join(cacheDir, 'nginx', 'conf.d'),
|
|
73
77
|
o: 'bind'
|
|
@@ -75,7 +79,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
|
|
|
75
79
|
};
|
|
76
80
|
volumes.appPub = {
|
|
77
81
|
name: `${ prefix }_pub-data`,
|
|
78
|
-
|
|
82
|
+
opt: {
|
|
79
83
|
type: 'nfs',
|
|
80
84
|
device: path.join(magentoDir, 'pub'),
|
|
81
85
|
o: 'bind'
|
|
@@ -83,7 +87,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
|
|
|
83
87
|
};
|
|
84
88
|
volumes.appSetup = {
|
|
85
89
|
name: `${ prefix }_setup-data`,
|
|
86
|
-
|
|
90
|
+
opt: {
|
|
87
91
|
type: 'nfs',
|
|
88
92
|
device: path.join(magentoDir, 'setup'),
|
|
89
93
|
o: 'bind'
|
|
@@ -91,7 +95,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
|
|
|
91
95
|
};
|
|
92
96
|
volumes.sslTerminator = {
|
|
93
97
|
name: `${ prefix }_ssl-terminator-data`,
|
|
94
|
-
|
|
98
|
+
opt: {
|
|
95
99
|
type: 'nfs',
|
|
96
100
|
device: path.join(cacheDir, 'ssl-terminator', 'conf.d'),
|
|
97
101
|
o: 'bind'
|
|
@@ -101,7 +105,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
|
|
|
101
105
|
if (varnish.enabled) {
|
|
102
106
|
volumes.varnish = {
|
|
103
107
|
name: `${ prefix }_varnish-data`,
|
|
104
|
-
|
|
108
|
+
opt: {
|
|
105
109
|
type: 'nfs',
|
|
106
110
|
device: path.join(cacheDir, 'varnish'),
|
|
107
111
|
o: 'bind'
|
|
@@ -128,11 +132,13 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
|
|
|
128
132
|
network: isNotNativeLinux ? network.name : 'host',
|
|
129
133
|
mountVolumes: [
|
|
130
134
|
`${ isLinux ? magentoDir : volumes.php.name }:${containerMagentoDir}`,
|
|
135
|
+
`${ volumes.composer_home.name }:/composer/home`,
|
|
131
136
|
`${ php.iniPath }:/usr/local/etc/php/php.ini`,
|
|
132
137
|
`${ php.fpmConfPath }:/usr/local/etc/php-fpm.d/zz-docker.conf`
|
|
133
138
|
],
|
|
134
139
|
env: {
|
|
135
|
-
COMPOSER_AUTH: process.env.COMPOSER_AUTH || ''
|
|
140
|
+
COMPOSER_AUTH: process.env.COMPOSER_AUTH || '',
|
|
141
|
+
COMPOSER_HOME: '/composer/home'
|
|
136
142
|
},
|
|
137
143
|
restart: 'on-failure:5',
|
|
138
144
|
image: `local-cma-project:${ prefix }`,
|
|
@@ -166,7 +172,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
|
|
|
166
172
|
],
|
|
167
173
|
restart: 'on-failure:5',
|
|
168
174
|
network: isNotNativeLinux ? network.name : 'host',
|
|
169
|
-
image: `nginx:${ nginx.version }`,
|
|
175
|
+
image: `${ nginx.version ? `nginx:${ nginx.version }` : nginx.image }`,
|
|
170
176
|
name: `${ prefix }_ssl-terminator`,
|
|
171
177
|
command: "nginx -g 'daemon off;'"
|
|
172
178
|
},
|
|
@@ -198,7 +204,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
|
|
|
198
204
|
restart: 'on-failure:5',
|
|
199
205
|
// TODO: use connect instead
|
|
200
206
|
network: isNotNativeLinux ? network.name : 'host',
|
|
201
|
-
image: `nginx:${ nginx.version }`,
|
|
207
|
+
image: `${ nginx.version ? `nginx:${ nginx.version }` : nginx.image }`,
|
|
202
208
|
name: `${ prefix }_nginx`,
|
|
203
209
|
command: "nginx -g 'daemon off;'"
|
|
204
210
|
},
|
|
@@ -212,47 +218,37 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
|
|
|
212
218
|
mounts: [`source=${ volumes.redis.name },target=/data`],
|
|
213
219
|
// TODO: use connect instead
|
|
214
220
|
network: network.name,
|
|
215
|
-
image: `redis:${ redis.version }`,
|
|
216
|
-
imageDetails: {
|
|
217
|
-
name: 'redis',
|
|
218
|
-
tag: redis.version
|
|
219
|
-
},
|
|
221
|
+
image: `${ redis.version ? `redis:${ redis.version }` : redis.image }`,
|
|
220
222
|
name: `${ prefix }_redis`,
|
|
221
223
|
connectCommand: ['redis-cli']
|
|
222
224
|
},
|
|
223
|
-
|
|
225
|
+
mariadb: {
|
|
224
226
|
_: 'MariaDB',
|
|
225
227
|
healthCheck: {
|
|
226
228
|
cmd: 'mysqladmin ping --silent'
|
|
227
229
|
},
|
|
228
|
-
ports: [`127.0.0.1:${ ports.
|
|
229
|
-
forwardedPorts: [`127.0.0.1:${ ports.
|
|
230
|
-
|
|
230
|
+
ports: [`127.0.0.1:${ ports.mariadb }:3306`],
|
|
231
|
+
forwardedPorts: [`127.0.0.1:${ ports.mariadb }:3306`],
|
|
232
|
+
mountVolumes: [
|
|
233
|
+
`${ volumes.mariadb.name }:/var/lib/mysql`,
|
|
234
|
+
`${ path.join(baseConfig.cacheDir, 'mariadb.cnf') }:/etc/mysql/my.cnf`
|
|
235
|
+
],
|
|
231
236
|
env: {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
+
MARIADB_PORT: 3306,
|
|
238
|
+
MARIADB_ROOT_PASSWORD: 'scandipwa',
|
|
239
|
+
MARIADB_USER: 'magento',
|
|
240
|
+
MARIADB_PASSWORD: 'magento',
|
|
241
|
+
MARIADB_DATABASE: 'magento'
|
|
237
242
|
},
|
|
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
243
|
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'
|
|
244
|
+
'--log_bin_trust_function_creators=1'
|
|
249
245
|
]
|
|
250
246
|
.join(' '),
|
|
251
247
|
securityOptions: [
|
|
252
248
|
'seccomp=unconfined'
|
|
253
249
|
],
|
|
254
250
|
network: network.name,
|
|
255
|
-
image: `mariadb:${ mariadb.version }`,
|
|
251
|
+
image: `${ mariadb.version ? `mariadb:${ mariadb.version }` : mariadb.image }`,
|
|
256
252
|
name: `${ prefix }_mariadb`
|
|
257
253
|
},
|
|
258
254
|
elasticsearch: {
|
|
@@ -263,16 +259,12 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
|
|
|
263
259
|
ports: [`127.0.0.1:${ ports.elasticsearch }:9200`],
|
|
264
260
|
forwardedPorts: [`127.0.0.1:${ ports.elasticsearch }:9200`],
|
|
265
261
|
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',
|
|
262
|
+
env: deepmerge({
|
|
271
263
|
// https://www.elastic.co/guide/en/elasticsearch/reference/master/ml-settings.html
|
|
272
264
|
'xpack.ml.enabled': ['sse4.2', 'sse4_2'].some((sse42Flag) => cpuSupportedFlags.includes(sse42Flag))
|
|
273
|
-
},
|
|
265
|
+
}, elasticsearch.env),
|
|
274
266
|
network: network.name,
|
|
275
|
-
image: `elasticsearch:${ elasticsearch.version }`,
|
|
267
|
+
image: `${ elasticsearch.version ? `elasticsearch:${ elasticsearch.version }` : elasticsearch.image }`,
|
|
276
268
|
name: `${ prefix }_elasticsearch`
|
|
277
269
|
}
|
|
278
270
|
};
|
|
@@ -286,7 +278,7 @@ module.exports = async (ctx, overridenConfiguration, baseConfig) => {
|
|
|
286
278
|
if (!ctx.debug && varnish.enabled) {
|
|
287
279
|
dockerConfig.varnish = {
|
|
288
280
|
_: 'Varnish',
|
|
289
|
-
image: `varnish:${ varnish.version }`,
|
|
281
|
+
image: `${ varnish.version ? `varnish:${ varnish.version }` : varnish.image }`,
|
|
290
282
|
name: `${ prefix }_varnish`,
|
|
291
283
|
mountVolumes: [
|
|
292
284
|
`${ isLinux ? path.join(cacheDir, 'varnish') : volumes.varnish.name }:/etc/varnish`
|
package/lib/config/index.js
CHANGED
|
@@ -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:
|
|
22
|
+
containerMagentoDir: projectPath,
|
|
23
23
|
templateDir: path.join(__dirname, 'templates'),
|
|
24
24
|
cacheDir: path.join(projectPath, 'node_modules', '.create-magento-app-cache')
|
|
25
25
|
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const os = require('os');
|
|
2
|
+
const { getArchSync } = require('../../../../util/arch');
|
|
3
|
+
const { deepmerge } = require('../../../../util/deepmerge');
|
|
4
|
+
const { repo } = require('../base-repo');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @returns {import('../../../../../typings/index').ServiceWithImage}
|
|
8
|
+
*/
|
|
9
|
+
const elasticsearch68 = ({
|
|
10
|
+
image = `${ repo }:elasticsearch-6.8`
|
|
11
|
+
} = {}) => ({
|
|
12
|
+
image,
|
|
13
|
+
env: deepmerge({
|
|
14
|
+
'bootstrap.memory_lock': true,
|
|
15
|
+
'xpack.security.enabled': false,
|
|
16
|
+
'discovery.type': 'single-node',
|
|
17
|
+
ES_JAVA_OPTS: '-Xms512m -Xmx512m'
|
|
18
|
+
}, os.platform() === 'darwin' && getArchSync() === 'arm64' ? {
|
|
19
|
+
'xpack.ml.enabled': false
|
|
20
|
+
} : {})
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
module.exports = elasticsearch68;
|
|
@@ -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
|
|
15
|
-
alias
|
|
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
|
},
|