@scandipwa/magento-scripts 2.0.0-alpha.4 → 2.0.0-alpha.7
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/config/docker.js +1 -1
- package/lib/config/templates/ssl-terminator.template.conf +8 -3
- package/lib/config/versions/magento-2.3.7-p4.js +44 -0
- package/lib/config/versions/magento-2.4.3-p3.js +46 -0
- package/lib/config/versions/magento-2.4.4-p1.js +46 -0
- package/lib/config/versions/magento-2.4.5.js +46 -0
- package/lib/tasks/docker/project-image-builder.js +2 -2
- package/lib/tasks/magento/setup-magento/set-base-url.js +1 -1
- package/lib/tasks/magento/setup-magento/waiting-for-varnish.js +3 -1
- package/package.json +2 -2
package/lib/config/docker.js
CHANGED
|
@@ -12,20 +12,25 @@ upstream app_backend {
|
|
|
12
12
|
server {
|
|
13
13
|
listen <%= it.hostPort %>;
|
|
14
14
|
<% if (it.config.ssl.enabled) { %> listen 443 ssl;
|
|
15
|
-
server_name <%= it.networkToBindTo %>;
|
|
16
15
|
|
|
16
|
+
ssl on;
|
|
17
17
|
ssl_certificate /etc/nginx/conf.d/ssl_certificate.pem;
|
|
18
18
|
ssl_certificate_key /etc/nginx/conf.d/ssl_certificate-key.pem;
|
|
19
19
|
ssl_protocols TLSv1.2;<% } %>
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
<% if (it.config.host) { %>
|
|
22
|
+
server_name <%= it.config.host %><% if (it.config.ssl.enabled) { %> <%= it.networkToBindTo %><% } %>;
|
|
23
|
+
<% } else { %>
|
|
24
|
+
server_name <% if (it.config.ssl.enabled) { %> <%= it.networkToBindTo %><% } else { %>_<% } %>;
|
|
25
|
+
<% } %>
|
|
22
26
|
|
|
23
27
|
location / {
|
|
24
28
|
proxy_buffer_size 128k;
|
|
25
29
|
proxy_buffers 4 256k;
|
|
26
30
|
proxy_busy_buffers_size 256k;
|
|
27
31
|
proxy_set_header X-Real-IP $remote_addr;
|
|
28
|
-
proxy_set_header X-Forwarded-For $
|
|
32
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
33
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
|
29
34
|
proxy_set_header Host $http_host;
|
|
30
35
|
proxy_http_version 1.1;
|
|
31
36
|
proxy_set_header Connection "";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const { magento23PHPExtensionList } = require('../magento/required-php-extensions');
|
|
4
|
+
const { repo } = require('../php/base-repo');
|
|
5
|
+
const { php74 } = require('../php/versions');
|
|
6
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
7
|
+
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
8
|
+
|
|
9
|
+
module.exports = ({ templateDir } = {}) => ({
|
|
10
|
+
magentoVersion: '2.3.7-p4',
|
|
11
|
+
configuration: {
|
|
12
|
+
php: php74({
|
|
13
|
+
templateDir,
|
|
14
|
+
extensions: magento23PHPExtensionList,
|
|
15
|
+
baseImage: `${ repo }:php-7.4-magento-2.3`
|
|
16
|
+
}),
|
|
17
|
+
nginx: {
|
|
18
|
+
version: '1.18.0',
|
|
19
|
+
configTemplate: path.join(templateDir || '', 'nginx.template.conf')
|
|
20
|
+
},
|
|
21
|
+
redis: {
|
|
22
|
+
version: '6'
|
|
23
|
+
},
|
|
24
|
+
mysql: {
|
|
25
|
+
version: '5.7'
|
|
26
|
+
},
|
|
27
|
+
mariadb: {
|
|
28
|
+
version: '10.2'
|
|
29
|
+
},
|
|
30
|
+
elasticsearch: {
|
|
31
|
+
version: '7.9.3'
|
|
32
|
+
},
|
|
33
|
+
composer: {
|
|
34
|
+
version: '2'
|
|
35
|
+
},
|
|
36
|
+
varnish: varnish66({ templateDir }),
|
|
37
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
38
|
+
},
|
|
39
|
+
magento: defaultMagentoConfig,
|
|
40
|
+
host: 'localhost',
|
|
41
|
+
ssl: {
|
|
42
|
+
enabled: false
|
|
43
|
+
}
|
|
44
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const sodium = require('../php/extensions/sodium');
|
|
4
|
+
const { magento24PHPExtensionList } = require('../magento/required-php-extensions');
|
|
5
|
+
const { php74 } = require('../php/versions');
|
|
6
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
7
|
+
const { varnish66 } = require('../varnish/varnish-6-6');
|
|
8
|
+
const { repo } = require('../php/base-repo');
|
|
9
|
+
|
|
10
|
+
module.exports = ({ templateDir } = {}) => ({
|
|
11
|
+
magentoVersion: '2.4.3-p3',
|
|
12
|
+
isDefault: true,
|
|
13
|
+
configuration: {
|
|
14
|
+
php: php74({
|
|
15
|
+
templateDir,
|
|
16
|
+
extensions: { ...magento24PHPExtensionList, sodium },
|
|
17
|
+
baseImage: `${ repo }:php-7.4-magento-2.4`
|
|
18
|
+
}),
|
|
19
|
+
nginx: {
|
|
20
|
+
version: '1.18.0',
|
|
21
|
+
configTemplate: path.join(templateDir || '', 'nginx.template.conf')
|
|
22
|
+
},
|
|
23
|
+
redis: {
|
|
24
|
+
version: '6.0'
|
|
25
|
+
},
|
|
26
|
+
mysql: {
|
|
27
|
+
version: '8.0'
|
|
28
|
+
},
|
|
29
|
+
mariadb: {
|
|
30
|
+
version: '10.4'
|
|
31
|
+
},
|
|
32
|
+
elasticsearch: {
|
|
33
|
+
version: '7.16.3'
|
|
34
|
+
},
|
|
35
|
+
composer: {
|
|
36
|
+
version: '2'
|
|
37
|
+
},
|
|
38
|
+
varnish: varnish66({ templateDir }),
|
|
39
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
40
|
+
},
|
|
41
|
+
magento: defaultMagentoConfig,
|
|
42
|
+
host: 'localhost',
|
|
43
|
+
ssl: {
|
|
44
|
+
enabled: false
|
|
45
|
+
}
|
|
46
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const sodium = require('../php/extensions/sodium');
|
|
4
|
+
const { magento24PHPExtensionList } = require('../magento/required-php-extensions');
|
|
5
|
+
const { php81 } = require('../php/versions');
|
|
6
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
7
|
+
const { varnish70 } = require('../varnish/varnish-7-0');
|
|
8
|
+
const { repo } = require('../php/base-repo');
|
|
9
|
+
|
|
10
|
+
module.exports = ({ templateDir } = {}) => ({
|
|
11
|
+
magentoVersion: '2.4.4-p1',
|
|
12
|
+
isDefault: true,
|
|
13
|
+
configuration: {
|
|
14
|
+
php: php81({
|
|
15
|
+
templateDir,
|
|
16
|
+
extensions: { ...magento24PHPExtensionList, sodium },
|
|
17
|
+
baseImage: `${ repo }:php-8.1-magento-2.4`
|
|
18
|
+
}),
|
|
19
|
+
nginx: {
|
|
20
|
+
version: '1.18.0',
|
|
21
|
+
configTemplate: path.join(templateDir || '', 'nginx.template.conf')
|
|
22
|
+
},
|
|
23
|
+
redis: {
|
|
24
|
+
version: '6.0'
|
|
25
|
+
},
|
|
26
|
+
mysql: {
|
|
27
|
+
version: '8.0'
|
|
28
|
+
},
|
|
29
|
+
mariadb: {
|
|
30
|
+
version: '10.4'
|
|
31
|
+
},
|
|
32
|
+
elasticsearch: {
|
|
33
|
+
version: '7.16.3'
|
|
34
|
+
},
|
|
35
|
+
composer: {
|
|
36
|
+
version: '2'
|
|
37
|
+
},
|
|
38
|
+
varnish: varnish70({ templateDir }),
|
|
39
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
40
|
+
},
|
|
41
|
+
magento: defaultMagentoConfig,
|
|
42
|
+
host: 'localhost',
|
|
43
|
+
ssl: {
|
|
44
|
+
enabled: false
|
|
45
|
+
}
|
|
46
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
|
+
const sodium = require('../php/extensions/sodium');
|
|
4
|
+
const { magento24PHPExtensionList } = require('../magento/required-php-extensions');
|
|
5
|
+
const { php81 } = require('../php/versions');
|
|
6
|
+
const { sslTerminator } = require('../ssl-terminator');
|
|
7
|
+
const { varnish70 } = require('../varnish/varnish-7-0');
|
|
8
|
+
const { repo } = require('../php/base-repo');
|
|
9
|
+
|
|
10
|
+
module.exports = ({ templateDir } = {}) => ({
|
|
11
|
+
magentoVersion: '2.4.5',
|
|
12
|
+
isDefault: true,
|
|
13
|
+
configuration: {
|
|
14
|
+
php: php81({
|
|
15
|
+
templateDir,
|
|
16
|
+
extensions: { ...magento24PHPExtensionList, sodium },
|
|
17
|
+
baseImage: `${ repo }:php-8.1-magento-2.4`
|
|
18
|
+
}),
|
|
19
|
+
nginx: {
|
|
20
|
+
version: '1.18.0',
|
|
21
|
+
configTemplate: path.join(templateDir || '', 'nginx.template.conf')
|
|
22
|
+
},
|
|
23
|
+
redis: {
|
|
24
|
+
version: '6.0'
|
|
25
|
+
},
|
|
26
|
+
mysql: {
|
|
27
|
+
version: '8.0'
|
|
28
|
+
},
|
|
29
|
+
mariadb: {
|
|
30
|
+
version: '10.4'
|
|
31
|
+
},
|
|
32
|
+
elasticsearch: {
|
|
33
|
+
version: '7.17.5'
|
|
34
|
+
},
|
|
35
|
+
composer: {
|
|
36
|
+
version: '2'
|
|
37
|
+
},
|
|
38
|
+
varnish: varnish70({ templateDir }),
|
|
39
|
+
sslTerminator: sslTerminator({ templateDir })
|
|
40
|
+
},
|
|
41
|
+
magento: defaultMagentoConfig,
|
|
42
|
+
host: 'localhost',
|
|
43
|
+
ssl: {
|
|
44
|
+
enabled: false
|
|
45
|
+
}
|
|
46
|
+
});
|
|
@@ -68,9 +68,9 @@ const buildDockerFileInstructions = async (ctx, { image, tag }) => {
|
|
|
68
68
|
.comment('project image')
|
|
69
69
|
.from({ image, tag });
|
|
70
70
|
|
|
71
|
-
// install bash in image
|
|
71
|
+
// install bash and patch in image
|
|
72
72
|
dockerFileInstructions
|
|
73
|
-
.run('apk add --no-cache bash');
|
|
73
|
+
.run('apk add --no-cache bash patch');
|
|
74
74
|
|
|
75
75
|
if (missingExtensions.length > 0) {
|
|
76
76
|
const allDependencies = missingExtensions.map(
|
|
@@ -17,7 +17,7 @@ module.exports = () => ({
|
|
|
17
17
|
databaseConnection
|
|
18
18
|
} = ctx;
|
|
19
19
|
const isNgrok = host.endsWith('ngrok.io');
|
|
20
|
-
const enableSecureFrontend = ssl.enabled ? '1' : '0';
|
|
20
|
+
const enableSecureFrontend = (ctx.config.overridenConfiguration.configuration.varnish.enabled && ssl.enabled) ? '1' : '0';
|
|
21
21
|
const location = `${host}${ !isNgrok && ports.sslTerminator !== 80 ? `:${ports.sslTerminator }` : '' }/`;
|
|
22
22
|
const secureLocation = `${host}/`; // SSL will work only on port 443, so you cannot run multiple projects with SSL at the same time.
|
|
23
23
|
const httpUrl = `http://${location}`;
|
|
@@ -37,7 +37,9 @@ const getIsHealthCheckRequestBroken = async (ctx) => {
|
|
|
37
37
|
*/
|
|
38
38
|
const waitingForVarnish = () => ({
|
|
39
39
|
title: 'Waiting for Varnish to return code 200',
|
|
40
|
-
skip: (ctx) => ctx.debug
|
|
40
|
+
skip: (ctx) => ctx.debug
|
|
41
|
+
|| !ctx.config.overridenConfiguration.configuration.varnish.enabled
|
|
42
|
+
|| ctx.config.overridenConfiguration.ssl.enabled,
|
|
41
43
|
task: async (ctx, task) => {
|
|
42
44
|
const pureMagentoVersion = ctx.magentoVersion.match(/^([0-9]+\.[0-9]+\.[0-9]+)/)[1];
|
|
43
45
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Scripts and configuration used by CMA.",
|
|
4
4
|
"homepage": "https://docs.create-magento-app.com/",
|
|
5
5
|
"repository": "github:scandipwa/create-magento-app",
|
|
6
|
-
"version": "2.0.0-alpha.
|
|
6
|
+
"version": "2.0.0-alpha.7",
|
|
7
7
|
"main": "./index.js",
|
|
8
8
|
"types": "./typings/index.d.ts",
|
|
9
9
|
"license": "OSL-3.0",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"mysql",
|
|
54
54
|
"scandipwa"
|
|
55
55
|
],
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "c965b81745323f4b3dce11965d49b2de32a4d79c"
|
|
57
57
|
}
|