@scandipwa/magento-scripts 2.0.0-alpha.4 → 2.0.0-alpha.5
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
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 "";
|
|
@@ -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.5",
|
|
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": "ed87e306b9c10d353bf485c093f8883c29e05cef"
|
|
57
57
|
}
|