@scandipwa/magento-scripts 2.0.0-alpha.9 → 2.0.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 +18 -1
- package/lib/commands/logs.js +28 -2
- package/lib/commands/start.js +24 -3
- package/lib/commands/status.js +19 -1
- package/lib/config/config.js +20 -2
- package/lib/config/dependencies-for-platforms.js +1 -113
- package/lib/config/docker.js +94 -54
- package/lib/config/get-project-configuration.js +5 -0
- package/lib/config/index.js +10 -3
- package/lib/config/magento/required-php-extensions/index.js +1 -1
- package/lib/config/php-config.js +4 -3
- package/lib/config/port-config.js +3 -1
- package/lib/config/services/composer/versions/composer-1.js +13 -0
- package/lib/config/services/composer/versions/composer-2.js +8 -0
- package/lib/config/services/composer/versions/index.js +4 -0
- package/lib/config/services/elasticsearch/versions/elasticsearch-7.10.js +11 -0
- package/lib/config/services/elasticsearch/versions/elasticsearch-7.12.js +11 -0
- package/lib/config/services/elasticsearch/versions/elasticsearch-7.16.js +11 -0
- package/lib/config/services/elasticsearch/versions/elasticsearch-7.17.js +11 -0
- package/lib/config/services/elasticsearch/versions/elasticsearch-7.6.js +11 -0
- package/lib/config/services/elasticsearch/versions/elasticsearch-7.7.js +11 -0
- package/lib/config/services/elasticsearch/versions/elasticsearch-7.9.js +11 -0
- package/lib/config/services/elasticsearch/versions/index.js +15 -1
- package/lib/config/services/maildev/index.js +7 -0
- package/lib/config/services/mariadb/versions/index.js +5 -0
- package/lib/config/services/mariadb/versions/mariadb-10.2.js +8 -0
- package/lib/config/services/mariadb/versions/mariadb-10.3.js +8 -0
- package/lib/config/services/mariadb/versions/mariadb-10.4.js +8 -0
- package/lib/config/services/nginx/versions/index.js +3 -0
- package/lib/config/services/nginx/versions/nginx-1.18.js +11 -0
- package/lib/config/{php → services/php}/base-repo.js +0 -0
- package/lib/config/{php → services/php}/extensions/apcu.js +0 -0
- package/lib/config/{php → services/php}/extensions/bcmath.js +0 -0
- package/lib/config/{php → services/php}/extensions/curl.js +0 -0
- package/lib/config/{php → services/php}/extensions/gd.js +0 -0
- package/lib/config/{php → services/php}/extensions/index.js +0 -0
- package/lib/config/{php → services/php}/extensions/intl.js +0 -0
- package/lib/config/{php → services/php}/extensions/opcache.js +0 -0
- package/lib/config/{php → services/php}/extensions/pdo_mysql.js +0 -0
- package/lib/config/{php → services/php}/extensions/soap.js +0 -0
- package/lib/config/{php → services/php}/extensions/sodium.js +0 -0
- package/lib/config/{php → services/php}/extensions/xdebug.js +0 -0
- package/lib/config/{php → services/php}/extensions/xsl.js +0 -0
- package/lib/config/{php → services/php}/extensions/zip.js +0 -0
- package/lib/config/{php → services/php}/versions/index.js +0 -0
- package/lib/config/{php → services/php}/versions/php-7.2.js +1 -0
- package/lib/config/{php → services/php}/versions/php-7.3.js +1 -0
- package/lib/config/{php → services/php}/versions/php-7.4.js +1 -0
- package/lib/config/{php → services/php}/versions/php-8.1.js +1 -0
- package/lib/config/services/redis/index.js +5 -0
- package/lib/config/services/redis/redis-5.0.js +8 -0
- package/lib/config/services/redis/redis-6.0.js +8 -0
- package/lib/config/services/redis/redis-6.2.js +8 -0
- package/lib/config/{ssl-terminator → services/ssl-terminator}/index.js +3 -0
- package/lib/config/services/varnish/index.js +5 -0
- package/lib/config/{varnish → services/varnish}/varnish-6-0.js +5 -3
- package/lib/config/{varnish → services/varnish}/varnish-6-6.js +5 -3
- package/lib/config/{varnish → services/varnish}/varnish-7-0.js +5 -3
- package/lib/config/templates/magentorc.template +12 -5
- package/lib/config/templates/nginx.fastcgi_params.template +29 -0
- package/lib/config/templates/nginx.template.conf +1 -1
- package/lib/config/templates/php-debug.template.ini +31 -0
- package/lib/config/templates/php-fpm.template.conf +1 -2
- package/lib/config/templates/php.template.ini +5 -201
- package/lib/config/templates/ssl-terminator.template.conf +2 -0
- package/lib/config/templates/varnish.template.vcl +20 -13
- package/lib/config/versions/magento-2.2.10.js +39 -0
- package/lib/config/versions/magento-2.3.0.js +15 -19
- package/lib/config/versions/magento-2.3.1.js +15 -19
- package/lib/config/versions/magento-2.3.2-p1.js +15 -19
- package/lib/config/versions/magento-2.3.2-p2.js +15 -19
- package/lib/config/versions/magento-2.3.2.js +15 -19
- package/lib/config/versions/magento-2.3.3-p1.js +15 -19
- package/lib/config/versions/magento-2.3.3.js +15 -19
- package/lib/config/versions/magento-2.3.4-p1.js +15 -19
- package/lib/config/versions/magento-2.3.4-p2.js +15 -19
- package/lib/config/versions/magento-2.3.4.js +15 -19
- package/lib/config/versions/magento-2.3.5-p1.js +17 -22
- package/lib/config/versions/magento-2.3.5-p2.js +17 -22
- package/lib/config/versions/magento-2.3.5.js +17 -22
- package/lib/config/versions/magento-2.3.6-p1.js +17 -22
- package/lib/config/versions/magento-2.3.6.js +17 -22
- package/lib/config/versions/magento-2.3.7-p1.js +17 -22
- package/lib/config/versions/magento-2.3.7-p2.js +17 -22
- package/lib/config/versions/magento-2.3.7-p3.js +17 -22
- package/lib/config/versions/magento-2.3.7-p4.js +17 -22
- package/lib/config/versions/magento-2.3.7.js +17 -22
- package/lib/config/versions/magento-2.4.0-p1.js +17 -22
- package/lib/config/versions/magento-2.4.0.js +17 -22
- package/lib/config/versions/magento-2.4.1-p1.js +18 -23
- package/lib/config/versions/magento-2.4.1.js +18 -23
- package/lib/config/versions/magento-2.4.2-p1.js +18 -23
- package/lib/config/versions/magento-2.4.2-p2.js +18 -23
- package/lib/config/versions/magento-2.4.2.js +18 -23
- package/lib/config/versions/magento-2.4.3-p1.js +18 -23
- package/lib/config/versions/magento-2.4.3-p2.js +18 -23
- package/lib/config/versions/magento-2.4.3-p3.js +18 -23
- package/lib/config/versions/magento-2.4.3.js +18 -23
- package/lib/config/versions/magento-2.4.4-p1.js +18 -23
- package/lib/config/versions/magento-2.4.4-p2.js +41 -0
- package/lib/config/versions/magento-2.4.4.js +18 -23
- package/lib/config/versions/magento-2.4.5-p1.js +41 -0
- package/lib/config/versions/magento-2.4.5.js +18 -23
- package/lib/tasks/cli/create-bashrc-config.js +4 -2
- package/lib/tasks/composer/local-auth-json.js +1 -1
- package/lib/tasks/database/connect-to-database.js +6 -3
- package/lib/tasks/database/create-magento-database.js +5 -2
- package/lib/tasks/database/create-magento-user.js +50 -0
- package/lib/tasks/database/default-magento-database.js +3 -0
- package/lib/tasks/database/default-magento-user.js +7 -0
- package/lib/tasks/database/import-dump-to-database.js +3 -2
- package/lib/tasks/docker/api.d.ts +25 -1
- package/lib/tasks/docker/api.js +31 -1
- package/lib/tasks/docker/containers/container-api.d.ts +17 -0
- package/lib/tasks/docker/containers/container-api.js +64 -9
- package/lib/tasks/docker/containers/tasks.js +44 -13
- package/lib/tasks/docker/convert-composer-home-to-composer-cache-volume.js +52 -0
- package/lib/tasks/docker/convert-mysql-to-mariadb.js +2 -2
- package/lib/tasks/docker/image/image-api.d.ts +44 -0
- package/lib/tasks/docker/image/image-api.js +30 -2
- package/lib/tasks/docker/index.js +6 -1
- package/lib/tasks/docker/network/tasks.js +19 -14
- package/lib/tasks/docker/project-image-builder.js +39 -14
- package/lib/tasks/docker/system/index.js +5 -0
- package/lib/tasks/docker/system/system-api.d.ts +71 -0
- package/lib/tasks/docker/system/system-api.js +35 -0
- package/lib/tasks/docker/volume/index.js +2 -1
- package/lib/tasks/docker/volume/tasks.js +67 -9
- package/lib/tasks/docker/volume/volume-api.d.ts +40 -0
- package/lib/tasks/docker/volume/volume-api.js +55 -2
- package/lib/tasks/execute.js +5 -2
- package/lib/tasks/file-system/create-nginx-config.js +3 -5
- package/lib/tasks/file-system/create-php-config.js +2 -23
- package/lib/tasks/file-system/create-php-debug-config.js +45 -0
- package/lib/tasks/file-system/create-php-fpm-config.js +2 -4
- package/lib/tasks/file-system/create-phpstorm-config/database-config.js +24 -5
- package/lib/tasks/file-system/create-phpstorm-config/eslint-config.js +25 -13
- package/lib/tasks/file-system/create-phpstorm-config/exclude-folder-config.js +13 -3
- package/lib/tasks/file-system/create-phpstorm-config/index.js +2 -1
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/custom-ruleset-path-config.js +18 -7
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/paths.js +4 -0
- package/lib/tasks/file-system/create-ssl-terminator-config.js +23 -8
- package/lib/tasks/file-system/create-varnish-config.js +4 -7
- package/lib/tasks/file-system/create-vscode-config.js +2 -1
- package/lib/tasks/file-system/index.js +3 -2
- package/lib/tasks/magento/setup-magento/configure-elasticsearch.js +2 -4
- package/lib/tasks/magento/setup-magento/flush-redis-config.js +3 -6
- package/lib/tasks/magento/setup-magento/index.js +2 -0
- package/lib/tasks/magento/setup-magento/install-magento.js +8 -13
- package/lib/tasks/magento/setup-magento/set-base-url.js +2 -1
- package/lib/tasks/magento/setup-magento/set-mail-config.js +22 -0
- package/lib/tasks/magento/setup-magento/varnish-config.js +4 -9
- package/lib/tasks/magento/setup-magento/waiting-for-varnish.js +15 -16
- package/lib/tasks/php/php-container.js +1 -1
- package/lib/tasks/php/update-env-php.js +4 -6
- package/lib/tasks/{prefix → project-config}/index.js +6 -6
- package/lib/tasks/requirements/composer-credentials.js +7 -3
- package/lib/tasks/requirements/docker/context.js +88 -0
- package/lib/tasks/requirements/docker/index.js +111 -19
- package/lib/tasks/requirements/docker/install.js +21 -7
- package/lib/tasks/requirements/docker/permissions.js +2 -11
- package/lib/tasks/requirements/docker/running-status.js +94 -24
- package/lib/tasks/requirements/docker/version.js +1 -0
- package/lib/tasks/requirements/index.js +0 -2
- package/lib/tasks/requirements/php-version.js +4 -2
- package/lib/tasks/start.js +27 -8
- package/lib/tasks/status/index.js +86 -21
- package/lib/tasks/stop.js +2 -0
- package/lib/tasks/theme/retrieve-theme-data.js +12 -2
- package/lib/util/config-file-validator.js +17 -3
- package/lib/util/connection-string.js +62 -0
- package/lib/util/execute-in-container.js +7 -8
- package/lib/util/instance-metadata.js +14 -2
- package/lib/util/systemctl.js +62 -13
- package/package.json +2 -2
- package/typings/context.d.ts +11 -0
- package/typings/index.d.ts +46 -1
- package/lib/tasks/requirements/dependency/arch.js +0 -50
- package/lib/tasks/requirements/dependency/centos.js +0 -36
- package/lib/tasks/requirements/dependency/fedora.js +0 -36
- package/lib/tasks/requirements/dependency/index.js +0 -33
- package/lib/tasks/requirements/dependency/mac.js +0 -124
- package/lib/tasks/requirements/dependency/ubuntu.js +0 -83
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -14,6 +14,7 @@ const php72 = ({
|
|
|
14
14
|
debugImage: `${ baseImage }-debug`,
|
|
15
15
|
configTemplate: path.join(templateDir || '', 'php.template.ini'),
|
|
16
16
|
fpmConfigTemplate: path.join(templateDir || '', 'php-fpm.template.conf'),
|
|
17
|
+
debugTemplate: path.join(templateDir || '', 'php-debug.template.ini'),
|
|
17
18
|
extensions: {
|
|
18
19
|
xdebug,
|
|
19
20
|
...extensions
|
|
@@ -14,6 +14,7 @@ const php73 = ({
|
|
|
14
14
|
debugImage: `${ baseImage }-debug`,
|
|
15
15
|
configTemplate: path.join(templateDir || '', 'php.template.ini'),
|
|
16
16
|
fpmConfigTemplate: path.join(templateDir || '', 'php-fpm.template.conf'),
|
|
17
|
+
debugTemplate: path.join(templateDir || '', 'php-debug.template.ini'),
|
|
17
18
|
extensions: {
|
|
18
19
|
xdebug,
|
|
19
20
|
...extensions
|
|
@@ -14,6 +14,7 @@ const php74 = ({
|
|
|
14
14
|
debugImage: `${ baseImage }-debug`,
|
|
15
15
|
configTemplate: path.join(templateDir || '', 'php.template.ini'),
|
|
16
16
|
fpmConfigTemplate: path.join(templateDir || '', 'php-fpm.template.conf'),
|
|
17
|
+
debugTemplate: path.join(templateDir || '', 'php-debug.template.ini'),
|
|
17
18
|
extensions: {
|
|
18
19
|
xdebug,
|
|
19
20
|
...extensions
|
|
@@ -14,6 +14,7 @@ const php81 = ({
|
|
|
14
14
|
debugImage: `${ baseImage }-debug`,
|
|
15
15
|
configTemplate: path.join(templateDir || '', 'php.template.ini'),
|
|
16
16
|
fpmConfigTemplate: path.join(templateDir || '', 'php-fpm.template.conf'),
|
|
17
|
+
debugTemplate: path.join(templateDir || '', 'php-debug.template.ini'),
|
|
17
18
|
extensions: {
|
|
18
19
|
xdebug,
|
|
19
20
|
...extensions
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @returns {import('../../../../typings/index').SSLTerminatorConfiguration}
|
|
5
|
+
*/
|
|
3
6
|
const sslTerminator = ({ templateDir }) => ({
|
|
4
7
|
version: '1.18.0',
|
|
5
8
|
configTemplate: path.join(templateDir || '', 'ssl-terminator.template.conf')
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @returns {import('../../../typings/index').VarnishConfiguration}
|
|
5
|
+
*/
|
|
3
6
|
const varnish60 = ({ templateDir }) => ({
|
|
4
7
|
enabled: true,
|
|
8
|
+
healthCheck: false,
|
|
5
9
|
version: '6.0',
|
|
6
10
|
configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
|
|
7
11
|
});
|
|
8
12
|
|
|
9
|
-
module.exports =
|
|
10
|
-
varnish60
|
|
11
|
-
};
|
|
13
|
+
module.exports = varnish60;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @returns {import('../../../typings/index').VarnishConfiguration}
|
|
5
|
+
*/
|
|
3
6
|
const varnish66 = ({ templateDir }) => ({
|
|
4
7
|
enabled: true,
|
|
8
|
+
healthCheck: false,
|
|
5
9
|
version: '6.6',
|
|
6
10
|
configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
|
|
7
11
|
});
|
|
8
12
|
|
|
9
|
-
module.exports =
|
|
10
|
-
varnish66
|
|
11
|
-
};
|
|
13
|
+
module.exports = varnish66;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @returns {import('../../../typings/index').VarnishConfiguration}
|
|
5
|
+
*/
|
|
3
6
|
const varnish70 = ({ templateDir }) => ({
|
|
4
7
|
enabled: true,
|
|
8
|
+
healthCheck: false,
|
|
5
9
|
version: '7.0',
|
|
6
10
|
configTemplate: path.join(templateDir || '', 'varnish.template.vcl')
|
|
7
11
|
});
|
|
8
12
|
|
|
9
|
-
module.exports =
|
|
10
|
-
varnish70
|
|
11
|
-
};
|
|
13
|
+
module.exports = varnish70;
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
RED='\033[0;31m'
|
|
2
2
|
GREEN='\033[0;32m'
|
|
3
|
+
YELLOW='\033[1;33m'
|
|
4
|
+
ORANGE='\033[0;33m'
|
|
5
|
+
BLUE='\033[0;34m'
|
|
3
6
|
NC='\033[0m' # No Color
|
|
4
7
|
|
|
5
|
-
alias
|
|
8
|
+
alias exec="node ./node_modules/.bin/magento-scripts-exec"
|
|
9
|
+
alias php="exec php php"
|
|
6
10
|
alias magento="php bin/magento"
|
|
7
11
|
alias magneto="echo -e 'Not ${RED}magneto${NC} but ${GREEN}magento${NC} please! or at least ${GREEN}m${NC}!' && magento"
|
|
8
12
|
alias m="magento"
|
|
9
|
-
alias composer="
|
|
13
|
+
alias composer="exec php composer"
|
|
10
14
|
alias c="composer"
|
|
11
15
|
<% if (it.varnishEnabled) { %>
|
|
12
|
-
alias cvc="
|
|
16
|
+
alias cvc="exec varnish varnishadm ban req.url '~ /' && echo 'Varnish cache cleared!'"
|
|
13
17
|
<% } %>
|
|
14
|
-
alias mariadb="
|
|
15
|
-
alias mariadbroot="
|
|
18
|
+
alias mariadb="exec mariadb 'mysql -umagento -pmagento'"
|
|
19
|
+
alias mariadbroot="exec mariadb 'mysql -uroot -pscandipwa'"
|
|
16
20
|
|
|
21
|
+
# silence warning on macos
|
|
17
22
|
export BASH_SILENCE_DEPRECATION_WARNING=1
|
|
23
|
+
|
|
24
|
+
export PS1="[${YELLOW}cli${NC}] \w [${YELLOW}<%~ it.magentoVersion %>${NC}] [${GREEN}\t${NC}] \nbash \v: "
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
fastcgi_param QUERY_STRING $query_string;
|
|
3
|
+
fastcgi_param REQUEST_METHOD $request_method;
|
|
4
|
+
fastcgi_param CONTENT_TYPE $content_type;
|
|
5
|
+
fastcgi_param CONTENT_LENGTH $content_length;
|
|
6
|
+
|
|
7
|
+
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
|
8
|
+
fastcgi_param REQUEST_URI $request_uri;
|
|
9
|
+
fastcgi_param DOCUMENT_URI $document_uri;
|
|
10
|
+
fastcgi_param DOCUMENT_ROOT $document_root;
|
|
11
|
+
fastcgi_param SERVER_PROTOCOL $server_protocol;
|
|
12
|
+
fastcgi_param REQUEST_SCHEME $scheme;
|
|
13
|
+
<% if (it.isNgrok) { %>
|
|
14
|
+
fastcgi_param HTTPS on;
|
|
15
|
+
<% } else { %>
|
|
16
|
+
fastcgi_param HTTPS $https if_not_empty;
|
|
17
|
+
<% } %>
|
|
18
|
+
|
|
19
|
+
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
|
|
20
|
+
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
|
|
21
|
+
|
|
22
|
+
fastcgi_param REMOTE_ADDR $remote_addr;
|
|
23
|
+
fastcgi_param REMOTE_PORT $remote_port;
|
|
24
|
+
fastcgi_param SERVER_ADDR $server_addr;
|
|
25
|
+
fastcgi_param SERVER_PORT $server_port;
|
|
26
|
+
fastcgi_param SERVER_NAME $server_name;
|
|
27
|
+
|
|
28
|
+
# PHP only, required if PHP was built with --enable-force-cgi-redirect
|
|
29
|
+
fastcgi_param REDIRECT_STATUS 200;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[xdebug]
|
|
2
|
+
error_reporting=E_ALL
|
|
3
|
+
|
|
4
|
+
xdebug.idekey=PHPSTORM
|
|
5
|
+
|
|
6
|
+
<% if (it.isXDebug2) { %>
|
|
7
|
+
xdebug.remote_autostart=1
|
|
8
|
+
xdebug.remote_enable=1
|
|
9
|
+
|
|
10
|
+
xdebug.remote_host=<%~ it.hostMachine %>
|
|
11
|
+
|
|
12
|
+
xdebug.remote_port=9003
|
|
13
|
+
|
|
14
|
+
xdebug.remote_log=<%~ it.mageRoot %>/var/log/xdebug.log
|
|
15
|
+
|
|
16
|
+
<% } else { %>
|
|
17
|
+
|
|
18
|
+
xdebug.mode=debug
|
|
19
|
+
xdebug.client_host=<%~ it.hostMachine %>
|
|
20
|
+
|
|
21
|
+
xdebug.client_port=9003
|
|
22
|
+
|
|
23
|
+
; THIS THING WILL BREAK PHP
|
|
24
|
+
; xdebug.start_with_request=yes
|
|
25
|
+
|
|
26
|
+
xdebug.discover_client_host=false
|
|
27
|
+
xdebug.start_upon_error=yes
|
|
28
|
+
|
|
29
|
+
xdebug.log=<%~ it.mageRoot %>/var/log/xdebug.log
|
|
30
|
+
|
|
31
|
+
<% } %>
|
|
@@ -3,6 +3,7 @@ daemonize = no
|
|
|
3
3
|
log_level = debug
|
|
4
4
|
|
|
5
5
|
[www]
|
|
6
|
+
clear_env = no
|
|
6
7
|
user = nobody
|
|
7
8
|
;; Commented because if it is not set, php-fpm will use default group.
|
|
8
9
|
;; https://www.php.net/manual/en/install.fpm.configuration.php#group
|
|
@@ -17,5 +18,3 @@ pm.max_requests = 5000
|
|
|
17
18
|
pm.process_idle_timeout = 10s
|
|
18
19
|
pm.status_path = /fpmstatus
|
|
19
20
|
listen = <%~ it.port %>
|
|
20
|
-
|
|
21
|
-
env[PATH] = $PATH
|
|
@@ -1811,159 +1811,13 @@ ldap.max_links = -1
|
|
|
1811
1811
|
;dba.default_handler=
|
|
1812
1812
|
|
|
1813
1813
|
[opcache]
|
|
1814
|
-
; Determines if Zend OPCache is enabled
|
|
1815
1814
|
opcache.enable=1
|
|
1816
|
-
|
|
1817
|
-
; Determines if Zend OPCache is enabled for the CLI version of PHP
|
|
1818
|
-
;opcache.enable_cli=0
|
|
1819
|
-
|
|
1820
|
-
; The OPcache shared memory storage size.
|
|
1821
|
-
;opcache.memory_consumption=128
|
|
1822
|
-
|
|
1823
|
-
; The amount of memory for interned strings in Mbytes.
|
|
1824
|
-
;opcache.interned_strings_buffer=8
|
|
1825
|
-
|
|
1826
|
-
; The maximum number of keys (scripts) in the OPcache hash table.
|
|
1827
|
-
; Only numbers between 200 and 1000000 are allowed.
|
|
1828
|
-
;opcache.max_accelerated_files=10000
|
|
1829
|
-
|
|
1830
|
-
; The maximum percentage of "wasted" memory until a restart is scheduled.
|
|
1831
|
-
;opcache.max_wasted_percentage=5
|
|
1832
|
-
|
|
1833
|
-
; When this directive is enabled, the OPcache appends the current working
|
|
1834
|
-
; directory to the script key, thus eliminating possible collisions between
|
|
1835
|
-
; files with the same name (basename). Disabling the directive improves
|
|
1836
|
-
; performance, but may break existing applications.
|
|
1837
|
-
;opcache.use_cwd=1
|
|
1838
|
-
|
|
1839
|
-
; When disabled, you must reset the OPcache manually or restart the
|
|
1840
|
-
; webserver for changes to the filesystem to take effect.
|
|
1815
|
+
opcache.revalidate_freq=0
|
|
1841
1816
|
opcache.validate_timestamps=1
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
opcache.revalidate_freq=2
|
|
1847
|
-
|
|
1848
|
-
; Enables or disables file search in include_path optimization
|
|
1849
|
-
;opcache.revalidate_path=0
|
|
1850
|
-
|
|
1851
|
-
; If disabled, all PHPDoc comments are dropped from the code to reduce the
|
|
1852
|
-
; size of the optimized code.
|
|
1853
|
-
opcache.save_comments=1
|
|
1854
|
-
|
|
1855
|
-
; If enabled, compilation warnings (including notices and deprecations) will
|
|
1856
|
-
; be recorded and replayed each time a file is included. Otherwise, compilation
|
|
1857
|
-
; warnings will only be emitted when the file is first cached.
|
|
1858
|
-
;opcache.record_warnings=0
|
|
1859
|
-
|
|
1860
|
-
; Allow file existence override (file_exists, etc.) performance feature.
|
|
1861
|
-
;opcache.enable_file_override=0
|
|
1862
|
-
|
|
1863
|
-
; A bitmask, where each bit enables or disables the appropriate OPcache
|
|
1864
|
-
; passes
|
|
1865
|
-
;opcache.optimization_level=0x7FFFBFFF
|
|
1866
|
-
|
|
1867
|
-
;opcache.dups_fix=0
|
|
1868
|
-
|
|
1869
|
-
; The location of the OPcache blacklist file (wildcards allowed).
|
|
1870
|
-
; Each OPcache blacklist file is a text file that holds the names of files
|
|
1871
|
-
; that should not be accelerated. The file format is to add each filename
|
|
1872
|
-
; to a new line. The filename may be a full path or just a file prefix
|
|
1873
|
-
; (i.e., /var/www/x blacklists all the files and directories in /var/www
|
|
1874
|
-
; that start with 'x'). Line starting with a ; are ignored (comments).
|
|
1875
|
-
;opcache.blacklist_filename=
|
|
1876
|
-
|
|
1877
|
-
; Allows exclusion of large files from being cached. By default all files
|
|
1878
|
-
; are cached.
|
|
1879
|
-
;opcache.max_file_size=0
|
|
1880
|
-
|
|
1881
|
-
; Check the cache checksum each N requests.
|
|
1882
|
-
; The default value of "0" means that the checks are disabled.
|
|
1883
|
-
;opcache.consistency_checks=0
|
|
1884
|
-
|
|
1885
|
-
; How long to wait (in seconds) for a scheduled restart to begin if the cache
|
|
1886
|
-
; is not being accessed.
|
|
1887
|
-
;opcache.force_restart_timeout=180
|
|
1888
|
-
|
|
1889
|
-
; OPcache error_log file name. Empty string assumes "stderr".
|
|
1890
|
-
;opcache.error_log=
|
|
1891
|
-
|
|
1892
|
-
; All OPcache errors go to the Web server log.
|
|
1893
|
-
; By default, only fatal errors (level 0) or errors (level 1) are logged.
|
|
1894
|
-
; You can also enable warnings (level 2), info messages (level 3) or
|
|
1895
|
-
; debug messages (level 4).
|
|
1896
|
-
;opcache.log_verbosity_level=1
|
|
1897
|
-
|
|
1898
|
-
; Preferred Shared Memory back-end. Leave empty and let the system decide.
|
|
1899
|
-
;opcache.preferred_memory_model=
|
|
1900
|
-
|
|
1901
|
-
; Protect the shared memory from unexpected writing during script execution.
|
|
1902
|
-
; Useful for internal debugging only.
|
|
1903
|
-
;opcache.protect_memory=0
|
|
1904
|
-
|
|
1905
|
-
; Allows calling OPcache API functions only from PHP scripts which path is
|
|
1906
|
-
; started from specified string. The default "" means no restriction
|
|
1907
|
-
;opcache.restrict_api=
|
|
1908
|
-
|
|
1909
|
-
; Mapping base of shared memory segments (for Windows only). All the PHP
|
|
1910
|
-
; processes have to map shared memory into the same address space. This
|
|
1911
|
-
; directive allows to manually fix the "Unable to reattach to base address"
|
|
1912
|
-
; errors.
|
|
1913
|
-
;opcache.mmap_base=
|
|
1914
|
-
|
|
1915
|
-
; Facilitates multiple OPcache instances per user (for Windows only). All PHP
|
|
1916
|
-
; processes with the same cache ID and user share an OPcache instance.
|
|
1917
|
-
;opcache.cache_id=
|
|
1918
|
-
|
|
1919
|
-
; Enables and sets the second level cache directory.
|
|
1920
|
-
; It should improve performance when SHM memory is full, at server restart or
|
|
1921
|
-
; SHM reset. The default "" disables file based caching.
|
|
1922
|
-
;opcache.file_cache=
|
|
1923
|
-
|
|
1924
|
-
; Enables or disables opcode caching in shared memory.
|
|
1925
|
-
;opcache.file_cache_only=0
|
|
1926
|
-
|
|
1927
|
-
; Enables or disables checksum validation when script loaded from file cache.
|
|
1928
|
-
;opcache.file_cache_consistency_checks=1
|
|
1929
|
-
|
|
1930
|
-
; Implies opcache.file_cache_only=1 for a certain process that failed to
|
|
1931
|
-
; reattach to the shared memory (for Windows only). Explicitly enabled file
|
|
1932
|
-
; cache is required.
|
|
1933
|
-
;opcache.file_cache_fallback=1
|
|
1934
|
-
|
|
1935
|
-
; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
|
|
1936
|
-
; This should improve performance, but requires appropriate OS configuration.
|
|
1937
|
-
;opcache.huge_code_pages=1
|
|
1938
|
-
|
|
1939
|
-
; Validate cached file permissions.
|
|
1940
|
-
;opcache.validate_permission=0
|
|
1941
|
-
|
|
1942
|
-
; Prevent name collisions in chroot'ed environment.
|
|
1943
|
-
;opcache.validate_root=0
|
|
1944
|
-
|
|
1945
|
-
; If specified, it produces opcode dumps for debugging different stages of
|
|
1946
|
-
; optimizations.
|
|
1947
|
-
;opcache.opt_debug_level=0
|
|
1948
|
-
|
|
1949
|
-
; Specifies a PHP script that is going to be compiled and executed at server
|
|
1950
|
-
; start-up.
|
|
1951
|
-
; https://php.net/opcache.preload
|
|
1952
|
-
;opcache.preload=
|
|
1953
|
-
|
|
1954
|
-
; Preloading code as root is not allowed for security reasons. This directive
|
|
1955
|
-
; facilitates to let the preloading to be run as another user.
|
|
1956
|
-
; https://php.net/opcache.preload_user
|
|
1957
|
-
;opcache.preload_user=
|
|
1958
|
-
|
|
1959
|
-
; Prevents caching files that are less than this number of seconds old. It
|
|
1960
|
-
; protects from caching of incompletely updated files. In case all file updates
|
|
1961
|
-
; on your site are atomic, you may increase performance by setting it to "0".
|
|
1962
|
-
;opcache.file_update_protection=2
|
|
1963
|
-
|
|
1964
|
-
; Absolute path used to store shared lockfiles (for *nix only).
|
|
1965
|
-
;opcache.lockfile_path=/tmp
|
|
1966
|
-
|
|
1817
|
+
opcache.max_accelerated_files=100000
|
|
1818
|
+
opcache.memory_consumption=192
|
|
1819
|
+
opcache.max_wasted_percentage=10
|
|
1820
|
+
opcache.interned_strings_buffer=16
|
|
1967
1821
|
[curl]
|
|
1968
1822
|
; A default value for the CURLOPT_CAINFO option. This is required to be an
|
|
1969
1823
|
; absolute path.
|
|
@@ -1996,53 +1850,3 @@ opcache.save_comments=1
|
|
|
1996
1850
|
|
|
1997
1851
|
; List of headers files to preload, wildcard patterns allowed.
|
|
1998
1852
|
;ffi.preload=
|
|
1999
|
-
|
|
2000
|
-
[xdebug]
|
|
2001
|
-
<% if (it.debug) { %>
|
|
2002
|
-
error_reporting=E_ALL
|
|
2003
|
-
|
|
2004
|
-
xdebug.idekey=PHPSTORM
|
|
2005
|
-
|
|
2006
|
-
<% if (it.isXDebug2) { %>
|
|
2007
|
-
xdebug.remote_autostart=1
|
|
2008
|
-
xdebug.remote_enable=1
|
|
2009
|
-
|
|
2010
|
-
xdebug.remote_host=<%~ it.hostMachine %>
|
|
2011
|
-
|
|
2012
|
-
xdebug.remote_port=9003
|
|
2013
|
-
|
|
2014
|
-
xdebug.remote_log=<%~ it.mageRoot %>/var/log/xdebug.log
|
|
2015
|
-
|
|
2016
|
-
<% } else { %>
|
|
2017
|
-
|
|
2018
|
-
xdebug.mode=debug
|
|
2019
|
-
xdebug.client_host=<%~ it.hostMachine %>
|
|
2020
|
-
|
|
2021
|
-
xdebug.client_port=9003
|
|
2022
|
-
|
|
2023
|
-
; THIS THING WILL BREAK PHP
|
|
2024
|
-
; xdebug.start_with_request=yes
|
|
2025
|
-
|
|
2026
|
-
xdebug.discover_client_host=false
|
|
2027
|
-
xdebug.start_upon_error=yes
|
|
2028
|
-
|
|
2029
|
-
xdebug.log=<%~ it.mageRoot %>/var/log/xdebug.log
|
|
2030
|
-
|
|
2031
|
-
<% } %>
|
|
2032
|
-
|
|
2033
|
-
<% } else { %>
|
|
2034
|
-
|
|
2035
|
-
<% if (it.isXDebug2) { %>
|
|
2036
|
-
|
|
2037
|
-
xdebug.remote_autostart=0
|
|
2038
|
-
xdebug.remote_enable=0
|
|
2039
|
-
|
|
2040
|
-
<% } else { %>
|
|
2041
|
-
|
|
2042
|
-
xdebug.mode=off
|
|
2043
|
-
|
|
2044
|
-
<% } %>
|
|
2045
|
-
|
|
2046
|
-
<% } %>
|
|
2047
|
-
|
|
2048
|
-
apc.enabled=1
|
|
@@ -5,24 +5,31 @@ import std;
|
|
|
5
5
|
# The minimal Varnish version is 6.0
|
|
6
6
|
# For SSL offloading, pass the following header in your proxy server or load balancer: 'X-Forwarded-Proto: https'
|
|
7
7
|
|
|
8
|
+
<% if (it.healthCheck) { %>
|
|
9
|
+
probe healthcheck {
|
|
10
|
+
# .url = "/health_check.php";
|
|
11
|
+
.request =
|
|
12
|
+
"GET /health_check.php HTTP/1.1"
|
|
13
|
+
"Host: localhost"
|
|
14
|
+
"Connection: close"
|
|
15
|
+
"User-Agent: Varnish Health Probe";
|
|
16
|
+
.interval = 10s;
|
|
17
|
+
.timeout = 5s;
|
|
18
|
+
.window = 8;
|
|
19
|
+
.threshold = 3;
|
|
20
|
+
.initial = 3;
|
|
21
|
+
}
|
|
22
|
+
<% } %>
|
|
23
|
+
|
|
8
24
|
backend default {
|
|
9
25
|
.host = "<%= it.hostMachine %>";
|
|
10
26
|
.host_header = "Host: localhost";
|
|
11
27
|
.port = "<%= it.nginxPort %>";
|
|
12
28
|
.first_byte_timeout = 600s;
|
|
13
|
-
.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"Host: localhost"
|
|
18
|
-
"Connection: close"
|
|
19
|
-
"User-Agent: Varnish Health Probe";
|
|
20
|
-
.interval = 10s;
|
|
21
|
-
.timeout = 5s;
|
|
22
|
-
.window = 5;
|
|
23
|
-
.threshold = 3;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
29
|
+
.connect_timeout = 10s;
|
|
30
|
+
<% if (it.healthCheck) { %>
|
|
31
|
+
.probe = healthcheck;
|
|
32
|
+
<% } %>}
|
|
26
33
|
|
|
27
34
|
acl purge {
|
|
28
35
|
"<%= it.hostMachine %>";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const { defaultMagentoConfig } = require('../magento-config');
|
|
2
|
+
const { magento23PHPExtensionList } = require('../magento/required-php-extensions');
|
|
3
|
+
const { repo } = require('../services/php/base-repo');
|
|
4
|
+
const { php72 } = require('../services/php/versions');
|
|
5
|
+
const { composer1 } = require('../services/composer/versions');
|
|
6
|
+
const { elasticsearch68 } = require('../services/elasticsearch/versions');
|
|
7
|
+
const { maildev } = require('../services/maildev');
|
|
8
|
+
const { nginx118 } = require('../services/nginx/versions');
|
|
9
|
+
const { redis50 } = require('../services/redis');
|
|
10
|
+
const { sslTerminator } = require('../services/ssl-terminator');
|
|
11
|
+
const { varnish66 } = require('../services/varnish');
|
|
12
|
+
const { mariadb102 } = require('../services/mariadb/versions');
|
|
13
|
+
|
|
14
|
+
module.exports = ({ templateDir } = {}) => ({
|
|
15
|
+
magentoVersion: '2.2.10',
|
|
16
|
+
configuration: {
|
|
17
|
+
php: php72({
|
|
18
|
+
templateDir,
|
|
19
|
+
extensions: magento23PHPExtensionList,
|
|
20
|
+
baseImage: `${ repo }:php-7.2-magento-2.3`
|
|
21
|
+
}),
|
|
22
|
+
nginx: nginx118({ templateDir }),
|
|
23
|
+
redis: redis50(),
|
|
24
|
+
mysql: {
|
|
25
|
+
version: '5.7'
|
|
26
|
+
},
|
|
27
|
+
mariadb: mariadb102(),
|
|
28
|
+
elasticsearch: elasticsearch68(),
|
|
29
|
+
composer: composer1(),
|
|
30
|
+
varnish: varnish66({ templateDir }),
|
|
31
|
+
sslTerminator: sslTerminator({ templateDir }),
|
|
32
|
+
maildev: maildev()
|
|
33
|
+
},
|
|
34
|
+
magento: defaultMagentoConfig,
|
|
35
|
+
host: 'localhost',
|
|
36
|
+
ssl: {
|
|
37
|
+
enabled: false
|
|
38
|
+
}
|
|
39
|
+
});
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
1
|
const { defaultMagentoConfig } = require('../magento-config');
|
|
3
2
|
const { magento23PHPExtensionList } = require('../magento/required-php-extensions');
|
|
4
|
-
const { repo } = require('../php/base-repo');
|
|
5
|
-
const { php72 } = require('../php/versions');
|
|
3
|
+
const { repo } = require('../services/php/base-repo');
|
|
4
|
+
const { php72 } = require('../services/php/versions');
|
|
5
|
+
const { composer1 } = require('../services/composer/versions');
|
|
6
6
|
const { elasticsearch68 } = require('../services/elasticsearch/versions');
|
|
7
|
-
const {
|
|
8
|
-
const {
|
|
7
|
+
const { maildev } = require('../services/maildev');
|
|
8
|
+
const { nginx118 } = require('../services/nginx/versions');
|
|
9
|
+
const { redis50 } = require('../services/redis');
|
|
10
|
+
const { sslTerminator } = require('../services/ssl-terminator');
|
|
11
|
+
const { varnish66 } = require('../services/varnish');
|
|
12
|
+
const { mariadb102 } = require('../services/mariadb/versions');
|
|
9
13
|
|
|
10
14
|
module.exports = ({ templateDir } = {}) => ({
|
|
11
15
|
magentoVersion: '2.3.0',
|
|
@@ -15,25 +19,17 @@ module.exports = ({ templateDir } = {}) => ({
|
|
|
15
19
|
extensions: magento23PHPExtensionList,
|
|
16
20
|
baseImage: `${ repo }:php-7.2-magento-2.3`
|
|
17
21
|
}),
|
|
18
|
-
nginx: {
|
|
19
|
-
|
|
20
|
-
configTemplate: path.join(templateDir || '', 'nginx.template.conf')
|
|
21
|
-
},
|
|
22
|
-
redis: {
|
|
23
|
-
version: '5.0'
|
|
24
|
-
},
|
|
22
|
+
nginx: nginx118({ templateDir }),
|
|
23
|
+
redis: redis50(),
|
|
25
24
|
mysql: {
|
|
26
25
|
version: '5.7'
|
|
27
26
|
},
|
|
28
|
-
mariadb:
|
|
29
|
-
version: '10.2'
|
|
30
|
-
},
|
|
27
|
+
mariadb: mariadb102(),
|
|
31
28
|
elasticsearch: elasticsearch68(),
|
|
32
|
-
composer:
|
|
33
|
-
version: '1'
|
|
34
|
-
},
|
|
29
|
+
composer: composer1(),
|
|
35
30
|
varnish: varnish66({ templateDir }),
|
|
36
|
-
sslTerminator: sslTerminator({ templateDir })
|
|
31
|
+
sslTerminator: sslTerminator({ templateDir }),
|
|
32
|
+
maildev: maildev()
|
|
37
33
|
},
|
|
38
34
|
magento: defaultMagentoConfig,
|
|
39
35
|
host: 'localhost',
|