@lando/drupal 0.5.0
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/.editorconfig +12 -0
- package/.eslintignore +4 -0
- package/.eslintrc.json +31 -0
- package/.gitattributes +11 -0
- package/.lando.yml +14 -0
- package/.node-version +1 -0
- package/.nyc_output/99fdf4f0-8d76-41e4-aec7-60f4bf6ec276.json +1 -0
- package/.nyc_output/b8533b5c-db35-4371-9b1c-dcbc92e964f3.json +1 -0
- package/.nyc_output/processinfo/99fdf4f0-8d76-41e4-aec7-60f4bf6ec276.json +1 -0
- package/.nyc_output/processinfo/b8533b5c-db35-4371-9b1c-dcbc92e964f3.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -0
- package/.tool-versions +1 -0
- package/CHANGELOG.md +7 -0
- package/LICENSE.md +674 -0
- package/PRIVACY.md +169 -0
- package/README.md +74 -0
- package/actions-lando-config.yml +12 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +176 -0
- package/coverage/lib/index.html +116 -0
- package/coverage/lib/utils.js.html +151 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/recipes/drupal6/builder.js.html +160 -0
- package/coverage/recipes/drupal6/index.html +131 -0
- package/coverage/recipes/drupal6/init.js.html +109 -0
- package/coverage/recipes/drupal7/builder.js.html +151 -0
- package/coverage/recipes/drupal7/index.html +131 -0
- package/coverage/recipes/drupal7/init.js.html +109 -0
- package/coverage/recipes/drupal8/builder.js.html +193 -0
- package/coverage/recipes/drupal8/index.html +131 -0
- package/coverage/recipes/drupal8/init.js.html +109 -0
- package/coverage/recipes/drupal9/builder.js.html +211 -0
- package/coverage/recipes/drupal9/index.html +131 -0
- package/coverage/recipes/drupal9/init.js.html +109 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/index.js +3 -0
- package/lib/utils.js +22 -0
- package/netlify.toml +25 -0
- package/package.json +62 -0
- package/plugin.yml +29 -0
- package/recipes/drupal6/builder.js +25 -0
- package/recipes/drupal6/default.conf.tpl +122 -0
- package/recipes/drupal6/init.js +8 -0
- package/recipes/drupal6/mysql.cnf +110 -0
- package/recipes/drupal6/php.ini +52 -0
- package/recipes/drupal7/builder.js +22 -0
- package/recipes/drupal7/default.conf.tpl +122 -0
- package/recipes/drupal7/init.js +8 -0
- package/recipes/drupal7/mysql.cnf +110 -0
- package/recipes/drupal7/php.ini +49 -0
- package/recipes/drupal8/builder.js +36 -0
- package/recipes/drupal8/default.conf.tpl +122 -0
- package/recipes/drupal8/init.js +8 -0
- package/recipes/drupal8/mysql.cnf +110 -0
- package/recipes/drupal8/php.ini +49 -0
- package/recipes/drupal9/builder.js +42 -0
- package/recipes/drupal9/default.conf.tpl +122 -0
- package/recipes/drupal9/init.js +8 -0
- package/recipes/drupal9/mysql.cnf +110 -0
- package/recipes/drupal9/php.ini +49 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
var addSorting = (function() {
|
|
3
|
+
'use strict';
|
|
4
|
+
var cols,
|
|
5
|
+
currentSort = {
|
|
6
|
+
index: 0,
|
|
7
|
+
desc: false
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
// returns the summary table element
|
|
11
|
+
function getTable() {
|
|
12
|
+
return document.querySelector('.coverage-summary');
|
|
13
|
+
}
|
|
14
|
+
// returns the thead element of the summary table
|
|
15
|
+
function getTableHeader() {
|
|
16
|
+
return getTable().querySelector('thead tr');
|
|
17
|
+
}
|
|
18
|
+
// returns the tbody element of the summary table
|
|
19
|
+
function getTableBody() {
|
|
20
|
+
return getTable().querySelector('tbody');
|
|
21
|
+
}
|
|
22
|
+
// returns the th element for nth column
|
|
23
|
+
function getNthColumn(n) {
|
|
24
|
+
return getTableHeader().querySelectorAll('th')[n];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function onFilterInput() {
|
|
28
|
+
const searchValue = document.getElementById('fileSearch').value;
|
|
29
|
+
const rows = document.getElementsByTagName('tbody')[0].children;
|
|
30
|
+
for (let i = 0; i < rows.length; i++) {
|
|
31
|
+
const row = rows[i];
|
|
32
|
+
if (
|
|
33
|
+
row.textContent
|
|
34
|
+
.toLowerCase()
|
|
35
|
+
.includes(searchValue.toLowerCase())
|
|
36
|
+
) {
|
|
37
|
+
row.style.display = '';
|
|
38
|
+
} else {
|
|
39
|
+
row.style.display = 'none';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// loads the search box
|
|
45
|
+
function addSearchBox() {
|
|
46
|
+
var template = document.getElementById('filterTemplate');
|
|
47
|
+
var templateClone = template.content.cloneNode(true);
|
|
48
|
+
templateClone.getElementById('fileSearch').oninput = onFilterInput;
|
|
49
|
+
template.parentElement.appendChild(templateClone);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// loads all columns
|
|
53
|
+
function loadColumns() {
|
|
54
|
+
var colNodes = getTableHeader().querySelectorAll('th'),
|
|
55
|
+
colNode,
|
|
56
|
+
cols = [],
|
|
57
|
+
col,
|
|
58
|
+
i;
|
|
59
|
+
|
|
60
|
+
for (i = 0; i < colNodes.length; i += 1) {
|
|
61
|
+
colNode = colNodes[i];
|
|
62
|
+
col = {
|
|
63
|
+
key: colNode.getAttribute('data-col'),
|
|
64
|
+
sortable: !colNode.getAttribute('data-nosort'),
|
|
65
|
+
type: colNode.getAttribute('data-type') || 'string'
|
|
66
|
+
};
|
|
67
|
+
cols.push(col);
|
|
68
|
+
if (col.sortable) {
|
|
69
|
+
col.defaultDescSort = col.type === 'number';
|
|
70
|
+
colNode.innerHTML =
|
|
71
|
+
colNode.innerHTML + '<span class="sorter"></span>';
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return cols;
|
|
75
|
+
}
|
|
76
|
+
// attaches a data attribute to every tr element with an object
|
|
77
|
+
// of data values keyed by column name
|
|
78
|
+
function loadRowData(tableRow) {
|
|
79
|
+
var tableCols = tableRow.querySelectorAll('td'),
|
|
80
|
+
colNode,
|
|
81
|
+
col,
|
|
82
|
+
data = {},
|
|
83
|
+
i,
|
|
84
|
+
val;
|
|
85
|
+
for (i = 0; i < tableCols.length; i += 1) {
|
|
86
|
+
colNode = tableCols[i];
|
|
87
|
+
col = cols[i];
|
|
88
|
+
val = colNode.getAttribute('data-value');
|
|
89
|
+
if (col.type === 'number') {
|
|
90
|
+
val = Number(val);
|
|
91
|
+
}
|
|
92
|
+
data[col.key] = val;
|
|
93
|
+
}
|
|
94
|
+
return data;
|
|
95
|
+
}
|
|
96
|
+
// loads all row data
|
|
97
|
+
function loadData() {
|
|
98
|
+
var rows = getTableBody().querySelectorAll('tr'),
|
|
99
|
+
i;
|
|
100
|
+
|
|
101
|
+
for (i = 0; i < rows.length; i += 1) {
|
|
102
|
+
rows[i].data = loadRowData(rows[i]);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// sorts the table using the data for the ith column
|
|
106
|
+
function sortByIndex(index, desc) {
|
|
107
|
+
var key = cols[index].key,
|
|
108
|
+
sorter = function(a, b) {
|
|
109
|
+
a = a.data[key];
|
|
110
|
+
b = b.data[key];
|
|
111
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
112
|
+
},
|
|
113
|
+
finalSorter = sorter,
|
|
114
|
+
tableBody = document.querySelector('.coverage-summary tbody'),
|
|
115
|
+
rowNodes = tableBody.querySelectorAll('tr'),
|
|
116
|
+
rows = [],
|
|
117
|
+
i;
|
|
118
|
+
|
|
119
|
+
if (desc) {
|
|
120
|
+
finalSorter = function(a, b) {
|
|
121
|
+
return -1 * sorter(a, b);
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
for (i = 0; i < rowNodes.length; i += 1) {
|
|
126
|
+
rows.push(rowNodes[i]);
|
|
127
|
+
tableBody.removeChild(rowNodes[i]);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
rows.sort(finalSorter);
|
|
131
|
+
|
|
132
|
+
for (i = 0; i < rows.length; i += 1) {
|
|
133
|
+
tableBody.appendChild(rows[i]);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
// removes sort indicators for current column being sorted
|
|
137
|
+
function removeSortIndicators() {
|
|
138
|
+
var col = getNthColumn(currentSort.index),
|
|
139
|
+
cls = col.className;
|
|
140
|
+
|
|
141
|
+
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
|
|
142
|
+
col.className = cls;
|
|
143
|
+
}
|
|
144
|
+
// adds sort indicators for current column being sorted
|
|
145
|
+
function addSortIndicators() {
|
|
146
|
+
getNthColumn(currentSort.index).className += currentSort.desc
|
|
147
|
+
? ' sorted-desc'
|
|
148
|
+
: ' sorted';
|
|
149
|
+
}
|
|
150
|
+
// adds event listeners for all sorter widgets
|
|
151
|
+
function enableUI() {
|
|
152
|
+
var i,
|
|
153
|
+
el,
|
|
154
|
+
ithSorter = function ithSorter(i) {
|
|
155
|
+
var col = cols[i];
|
|
156
|
+
|
|
157
|
+
return function() {
|
|
158
|
+
var desc = col.defaultDescSort;
|
|
159
|
+
|
|
160
|
+
if (currentSort.index === i) {
|
|
161
|
+
desc = !currentSort.desc;
|
|
162
|
+
}
|
|
163
|
+
sortByIndex(i, desc);
|
|
164
|
+
removeSortIndicators();
|
|
165
|
+
currentSort.index = i;
|
|
166
|
+
currentSort.desc = desc;
|
|
167
|
+
addSortIndicators();
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
for (i = 0; i < cols.length; i += 1) {
|
|
171
|
+
if (cols[i].sortable) {
|
|
172
|
+
// add the click event handler on the th so users
|
|
173
|
+
// dont have to click on those tiny arrows
|
|
174
|
+
el = getNthColumn(i).querySelector('.sorter').parentElement;
|
|
175
|
+
if (el.addEventListener) {
|
|
176
|
+
el.addEventListener('click', ithSorter(i));
|
|
177
|
+
} else {
|
|
178
|
+
el.attachEvent('onclick', ithSorter(i));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
// adds sorting functionality to the UI
|
|
184
|
+
return function() {
|
|
185
|
+
if (!getTable()) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
cols = loadColumns();
|
|
189
|
+
loadData();
|
|
190
|
+
addSearchBox();
|
|
191
|
+
addSortIndicators();
|
|
192
|
+
enableUI();
|
|
193
|
+
};
|
|
194
|
+
})();
|
|
195
|
+
|
|
196
|
+
window.addEventListener('load', addSorting);
|
package/index.js
ADDED
package/lib/utils.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Modules
|
|
4
|
+
const _ = require('lodash');
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Helper to get a phar download and setupcommand
|
|
8
|
+
* @TODO: clean this mess up
|
|
9
|
+
*/
|
|
10
|
+
exports.getPhar = (url, src, dest, check = 'true') => {
|
|
11
|
+
// Arrayify the check if needed
|
|
12
|
+
if (_.isString(check)) check = [check];
|
|
13
|
+
// Phar install command
|
|
14
|
+
const pharInstall = [
|
|
15
|
+
['curl', url, '-LsS', '-o', src],
|
|
16
|
+
['chmod', '+x', src],
|
|
17
|
+
['mv', src, dest],
|
|
18
|
+
check,
|
|
19
|
+
];
|
|
20
|
+
// Return
|
|
21
|
+
return _.map(pharInstall, cmd => cmd.join(' ')).join(' && ');
|
|
22
|
+
};
|
package/netlify.toml
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[build]
|
|
2
|
+
base = "./"
|
|
3
|
+
publish = "_site"
|
|
4
|
+
command = "yarn docs:build"
|
|
5
|
+
# This sort of lets us build only on tagged commits to prod
|
|
6
|
+
# [context.production]
|
|
7
|
+
# ignore = "if git diff $CACHED_COMMIT_REF $COMMIT_REF ./package.json | grep - | grep version && git diff $CACHED_COMMIT_REF $COMMIT_REF ./package.json | grep + | grep version; then exit 1; else exit 0; fi"
|
|
8
|
+
|
|
9
|
+
# Sets our asset optimization
|
|
10
|
+
[build.processing.css]
|
|
11
|
+
bundle = true
|
|
12
|
+
minify = true
|
|
13
|
+
[build.processing.js]
|
|
14
|
+
bundle = true
|
|
15
|
+
minify = true
|
|
16
|
+
[build.processing.html]
|
|
17
|
+
pretty_urls = false
|
|
18
|
+
[build.processing.images]
|
|
19
|
+
compress = true
|
|
20
|
+
|
|
21
|
+
# Caches our images for 1 year
|
|
22
|
+
[[headers]]
|
|
23
|
+
for = "/images/*"
|
|
24
|
+
[headers.values]
|
|
25
|
+
Cache-Control = "public, max-age=31536000"
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lando/drupal",
|
|
3
|
+
"description": "A Lando plugin that provides a tight integration with Drupal.",
|
|
4
|
+
"version": "0.5.0",
|
|
5
|
+
"author": "John Ouellet @labboy0276",
|
|
6
|
+
"license": "GPL-3.0",
|
|
7
|
+
"repository": "lando/drupal",
|
|
8
|
+
"bugs": "https://github.com/lando/drupal/issues/new/choose",
|
|
9
|
+
"homepage": "https://github.com/lando/drupal",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"lando",
|
|
12
|
+
"lando-plugin",
|
|
13
|
+
"drupal"
|
|
14
|
+
],
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=14.0.0"
|
|
17
|
+
},
|
|
18
|
+
"main": "index.js",
|
|
19
|
+
"nyc": {
|
|
20
|
+
"include": [
|
|
21
|
+
"lib/**/*.js",
|
|
22
|
+
"recipes/**/*.js",
|
|
23
|
+
"services/**/*.js",
|
|
24
|
+
"types/**/*.js"
|
|
25
|
+
],
|
|
26
|
+
"exclude": [
|
|
27
|
+
"test/**"
|
|
28
|
+
],
|
|
29
|
+
"cache": true,
|
|
30
|
+
"all": true
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"coverage": "nyc report --reporter=text-lcov | coveralls",
|
|
34
|
+
"docs:dev": "vuepress dev docs",
|
|
35
|
+
"docs:build": "vuepress build docs --dest _site",
|
|
36
|
+
"docs:lint": "eslint -c docs/.eslintrc.json --quiet docs/.vuepress",
|
|
37
|
+
"lint": "eslint --quiet . && yarn docs:lint",
|
|
38
|
+
"release": "bump --prompt --tag --all --push",
|
|
39
|
+
"test:unit": "nyc --reporter=html --reporter=text mocha --timeout 5000 test/**/*.spec.js",
|
|
40
|
+
"test:leia": "yarn leia \"examples/**/README.md\" -c 'Destroy tests' --stdin",
|
|
41
|
+
"test": "yarn lint && yarn test:unit"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"js-yaml": "^3.4.6",
|
|
45
|
+
"lodash": "^4.17.21",
|
|
46
|
+
"tar": "^6.1.11"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@babel/eslint-parser": "^7.16.0",
|
|
50
|
+
"@lando/leia": "^0.6.4",
|
|
51
|
+
"@lando/vuepress-theme-lando-docs": "^0.2.3",
|
|
52
|
+
"chai": "^4.3.4",
|
|
53
|
+
"command-line-test": "^1.0.10",
|
|
54
|
+
"eslint": "^7.32.0",
|
|
55
|
+
"eslint-config-google": "^0.9.1",
|
|
56
|
+
"eslint-plugin-vue": "^8.0.3",
|
|
57
|
+
"mocha": "^9.1.2",
|
|
58
|
+
"nyc": "^15.1.0",
|
|
59
|
+
"version-bump-prompt": "^4.2.1",
|
|
60
|
+
"vuepress": "^2.0.0-beta.27"
|
|
61
|
+
}
|
|
62
|
+
}
|
package/plugin.yml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# We don't need this because its in the package.json
|
|
2
|
+
# but we set it anyway just to make sure we know what is what
|
|
3
|
+
name: "@lando/drupal"
|
|
4
|
+
|
|
5
|
+
# Let lando autoscan this plugin for "legacy" plugin stuff needed for v3
|
|
6
|
+
legacy: true
|
|
7
|
+
|
|
8
|
+
# This is just metadata that something else can use to understand how the docs are organized
|
|
9
|
+
docs:
|
|
10
|
+
# This is the tag we should use when connecting platform.sh content together eg showing guides on the main
|
|
11
|
+
# platform.sh recipe docs
|
|
12
|
+
tag: drupal
|
|
13
|
+
|
|
14
|
+
# This gets added to the lando/lando docs guides.json
|
|
15
|
+
guides:
|
|
16
|
+
title: drupal
|
|
17
|
+
collapsable: true
|
|
18
|
+
# Note that these are "source/destination" pairs the source is relative to the root of this
|
|
19
|
+
# repo and the desintation is relative to docs/guides in the main lando repo
|
|
20
|
+
# When this gets added to guides.json we map children so its just the destination
|
|
21
|
+
children:
|
|
22
|
+
"guides/adding-tooling": drupal/adding-tooling
|
|
23
|
+
|
|
24
|
+
# This gets added to the lando/lando docs config.js
|
|
25
|
+
# Below takes docs/usage.md from this repo and puts it into config/drupal.md in lando/lando
|
|
26
|
+
# and then adds drupal to the list of recipes in config.js
|
|
27
|
+
config:
|
|
28
|
+
recipes:
|
|
29
|
+
"drupal": ./docs/usage.md
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Modules
|
|
4
|
+
const _ = require('lodash');
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Build Drupal 6
|
|
8
|
+
*/
|
|
9
|
+
module.exports = {
|
|
10
|
+
name: 'drupal6',
|
|
11
|
+
parent: '_drupaly',
|
|
12
|
+
config: {
|
|
13
|
+
confSrc: __dirname,
|
|
14
|
+
defaultFiles: {},
|
|
15
|
+
php: '5.6',
|
|
16
|
+
// @NOTE: below seems to be the last known drush version that let you do
|
|
17
|
+
// drush si -y succesfully
|
|
18
|
+
drush: '8.4.5',
|
|
19
|
+
},
|
|
20
|
+
builder: (parent, config) => class LandoDrupal6 extends parent {
|
|
21
|
+
constructor(id, options = {}) {
|
|
22
|
+
super(id, _.merge({}, config, options));
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
server {
|
|
2
|
+
listen 80 default_server;
|
|
3
|
+
listen 443 ssl;
|
|
4
|
+
|
|
5
|
+
server_name localhost;
|
|
6
|
+
|
|
7
|
+
ssl_certificate /certs/cert.crt;
|
|
8
|
+
ssl_certificate_key /certs/cert.key;
|
|
9
|
+
ssl_verify_client off;
|
|
10
|
+
|
|
11
|
+
ssl_session_cache shared:SSL:1m;
|
|
12
|
+
ssl_session_timeout 5m;
|
|
13
|
+
|
|
14
|
+
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
15
|
+
ssl_prefer_server_ciphers on;
|
|
16
|
+
|
|
17
|
+
port_in_redirect off;
|
|
18
|
+
client_max_body_size 100M;
|
|
19
|
+
|
|
20
|
+
root "{{LANDO_WEBROOT}}";
|
|
21
|
+
|
|
22
|
+
location = /favicon.ico {
|
|
23
|
+
log_not_found off;
|
|
24
|
+
access_log off;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
location = /robots.txt {
|
|
28
|
+
allow all;
|
|
29
|
+
log_not_found off;
|
|
30
|
+
access_log off;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# Very rarely should these ever be accessed outside of your lan
|
|
34
|
+
location ~* \.(txt|log)$ {
|
|
35
|
+
allow 192.168.0.0/16;
|
|
36
|
+
deny all;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
location ~ \..*/.*\.php$ {
|
|
40
|
+
return 403;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
location ~ ^/sites/.*/private/ {
|
|
44
|
+
return 403;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
# Allow "Well-Known URIs" as per RFC 5785
|
|
48
|
+
location ~* ^/.well-known/ {
|
|
49
|
+
allow all;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
# Block access to "hidden" files and directories whose names begin with a
|
|
53
|
+
# period. This includes directories used by version control systems such
|
|
54
|
+
# as Subversion or Git to store control files.
|
|
55
|
+
location ~ (^|/)\. {
|
|
56
|
+
return 403;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
location / {
|
|
60
|
+
try_files $uri @rewrite; # For Drupal <= 6
|
|
61
|
+
# try_files $uri /index.php?$query_string; # For Drupal >= 7
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
location @rewrite {
|
|
65
|
+
rewrite ^/(.*)$ /index.php?q=$1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
# Don't allow direct access to PHP files in the vendor directory.
|
|
69
|
+
location ~ /vendor/.*\.php$ {
|
|
70
|
+
deny all;
|
|
71
|
+
return 404;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
# In Drupal 8, we must also match new paths where the '.php' appears in
|
|
75
|
+
# the middle, such as update.php/selection. The rule we use is strict,
|
|
76
|
+
# and only allows this pattern with the update.php front controller.
|
|
77
|
+
# This allows legacy path aliases in the form of
|
|
78
|
+
# blog/index.php/legacy-path to continue to route to Drupal nodes. If
|
|
79
|
+
# you do not have any paths like that, then you might prefer to use a
|
|
80
|
+
# laxer rule, such as:
|
|
81
|
+
# location ~ \.php(/|$) {
|
|
82
|
+
# The laxer rule will continue to work if Drupal uses this new URL
|
|
83
|
+
# pattern with front controllers other than update.php in a future
|
|
84
|
+
# release.
|
|
85
|
+
location ~ '\.php$|^/update.php' {
|
|
86
|
+
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
|
|
87
|
+
# Security note: If you're running a version of PHP older than the
|
|
88
|
+
# latest 5.3, you should have "cgi.fix_pathinfo = 0;" in php.ini.
|
|
89
|
+
# See http://serverfault.com/q/627903/94922 for details.
|
|
90
|
+
include fastcgi_params;
|
|
91
|
+
# Block httpoxy attacks. See https://httpoxy.org/.
|
|
92
|
+
fastcgi_param HTTP_PROXY "";
|
|
93
|
+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
94
|
+
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
95
|
+
fastcgi_param QUERY_STRING $query_string;
|
|
96
|
+
fastcgi_intercept_errors on;
|
|
97
|
+
# PHP 5 socket location.
|
|
98
|
+
#fastcgi_pass unix:/var/run/php5-fpm.sock;
|
|
99
|
+
# PHP 7 socket location.
|
|
100
|
+
#fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
|
|
101
|
+
#lando
|
|
102
|
+
fastcgi_pass fpm:9000;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
# Fighting with Styles? This little gem is amazing.
|
|
106
|
+
location ~ ^/sites/.*/files/imagecache/ { # For Drupal <= 6
|
|
107
|
+
# location ~ ^/sites/.*/files/styles/ { # For Drupal >= 7
|
|
108
|
+
try_files $uri @rewrite;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
# Handle private files through Drupal. Private file's path can come
|
|
112
|
+
# with a language prefix.
|
|
113
|
+
#location ~ ^(/[a-z\-]+)?/system/files/ { # For Drupal >= 7
|
|
114
|
+
# try_files $uri /index.php?$query_string;
|
|
115
|
+
#}
|
|
116
|
+
|
|
117
|
+
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
|
118
|
+
expires max;
|
|
119
|
+
log_not_found off;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
#
|
|
2
|
+
# The MySQL database server configuration file for Lando
|
|
3
|
+
#
|
|
4
|
+
|
|
5
|
+
[mysqld]
|
|
6
|
+
#
|
|
7
|
+
# * Basic Settings
|
|
8
|
+
#
|
|
9
|
+
# Data is stored in a volume on the db container /sql
|
|
10
|
+
default-storage-engine = innodb
|
|
11
|
+
|
|
12
|
+
#
|
|
13
|
+
# * Fine Tuning
|
|
14
|
+
#
|
|
15
|
+
key_buffer_size = 384M
|
|
16
|
+
max_allowed_packet = 32M
|
|
17
|
+
thread_stack = 400K
|
|
18
|
+
thread_cache_size = 8
|
|
19
|
+
# This replaces the startup script and checks MyISAM tables if needed
|
|
20
|
+
# the first time they are touched
|
|
21
|
+
#max_connections = 100
|
|
22
|
+
#table_cache = 64
|
|
23
|
+
#thread_concurrency = 10
|
|
24
|
+
read_rnd_buffer_size = 8M
|
|
25
|
+
myisam_sort_buffer_size = 64M
|
|
26
|
+
table_open_cache = 512
|
|
27
|
+
sort_buffer_size = 2M
|
|
28
|
+
read_buffer_size = 2M
|
|
29
|
+
|
|
30
|
+
#
|
|
31
|
+
# * Query Cache Configuration
|
|
32
|
+
#
|
|
33
|
+
query_cache_limit = 1M
|
|
34
|
+
query_cache_size = 64M
|
|
35
|
+
#
|
|
36
|
+
# * Logging and Replication
|
|
37
|
+
#
|
|
38
|
+
# Both location gets rotated by the cronjob.
|
|
39
|
+
# Be aware that this log type is a performance killer.
|
|
40
|
+
# As of 5.1 you can enable the log at runtime!
|
|
41
|
+
#general_log_file = /src/.lando/log/mysql.log
|
|
42
|
+
#general_log = 1
|
|
43
|
+
#
|
|
44
|
+
# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
|
|
45
|
+
#
|
|
46
|
+
# Here you can see queries with especially long duration
|
|
47
|
+
#log_slow_queries = /var/log/mysql/mysql-slow.log
|
|
48
|
+
#long_query_time = 2
|
|
49
|
+
#log-queries-not-using-indexes
|
|
50
|
+
#
|
|
51
|
+
# The following can be used as easy to replay backup logs or for replication.
|
|
52
|
+
# note: if you are setting up a replication slave, see README.Debian about
|
|
53
|
+
# other settings you may need to change.
|
|
54
|
+
#server-id = 1
|
|
55
|
+
#log_bin = /src/.lando/log/mysql-bin.log
|
|
56
|
+
expire_logs_days = 10
|
|
57
|
+
max_binlog_size = 100M
|
|
58
|
+
#binlog_do_db = include_database_name
|
|
59
|
+
#binlog_ignore_db = include_database_name
|
|
60
|
+
#
|
|
61
|
+
# * InnoDB
|
|
62
|
+
#
|
|
63
|
+
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
|
|
64
|
+
# Read the manual for more InnoDB related options. There are many!
|
|
65
|
+
#
|
|
66
|
+
# Uncomment the following if you are using InnoDB tables
|
|
67
|
+
#innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
|
|
68
|
+
#innodb_log_group_home_dir = C:\mysql\data/
|
|
69
|
+
# You can set .._buffer_pool_size up to 50 - 80 %
|
|
70
|
+
# of RAM but beware of setting memory usage too high
|
|
71
|
+
#innodb_buffer_pool_size = 384M
|
|
72
|
+
#innodb_additional_mem_pool_size = 20M
|
|
73
|
+
# Set .._log_file_size to 25 % of buffer pool size
|
|
74
|
+
innodb_log_file_size = 100M
|
|
75
|
+
#innodb_log_buffer_size = 8M
|
|
76
|
+
innodb_flush_log_at_trx_commit = 0
|
|
77
|
+
#innodb_lock_wait_timeout = 50
|
|
78
|
+
innodb_buffer_pool_size = 384M
|
|
79
|
+
innodb_log_buffer_size = 4M
|
|
80
|
+
innodb_file_per_table = 1
|
|
81
|
+
innodb_open_files = 256
|
|
82
|
+
innodb_io_capacity = 512
|
|
83
|
+
innodb_flush_method = O_DIRECT
|
|
84
|
+
innodb_thread_concurrency = 8
|
|
85
|
+
innodb_lock_wait_timeout = 120
|
|
86
|
+
#
|
|
87
|
+
# * Security Features
|
|
88
|
+
#
|
|
89
|
+
# Read the manual, too, if you want chroot!
|
|
90
|
+
# chroot = /var/lib/mysql/
|
|
91
|
+
#
|
|
92
|
+
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
|
|
93
|
+
#
|
|
94
|
+
# ssl-ca=/etc/mysql/cacert.pem
|
|
95
|
+
# ssl-cert=/etc/mysql/server-cert.pem
|
|
96
|
+
# ssl-key=/etc/mysql/server-key.pem
|
|
97
|
+
|
|
98
|
+
[mysqldump]
|
|
99
|
+
quick
|
|
100
|
+
quote-names
|
|
101
|
+
max_allowed_packet = 32M
|
|
102
|
+
|
|
103
|
+
[mysql]
|
|
104
|
+
#no-auto-rehash # faster start of mysql but no tab completion
|
|
105
|
+
|
|
106
|
+
[isamchk]
|
|
107
|
+
key_buffer_size = 384M
|
|
108
|
+
sort_buffer_size = 256M
|
|
109
|
+
read_buffer = 2M
|
|
110
|
+
write_buffer = 2M
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
[PHP]
|
|
2
|
+
|
|
3
|
+
;;;;;;;;;;;;;;;
|
|
4
|
+
; PHP Globals ;
|
|
5
|
+
;;;;;;;;;;;;;;;
|
|
6
|
+
|
|
7
|
+
short_open_tag = Off
|
|
8
|
+
output_buffering = 4096
|
|
9
|
+
allow_call_time_pass_reference = Off
|
|
10
|
+
request_order = "GP"
|
|
11
|
+
register_long_arrays = Off
|
|
12
|
+
register_argc_argv = Off
|
|
13
|
+
magic_quotes_gpc = Off
|
|
14
|
+
enable_dl = Off
|
|
15
|
+
allow_url_fopen = On
|
|
16
|
+
realpath_cache_size = "800K"
|
|
17
|
+
realpath_cache_ttl = "86400"
|
|
18
|
+
disable_functions =
|
|
19
|
+
sendmail_path=/bin/true
|
|
20
|
+
;include_path = ".:/usr/share/pear:/usr/share/php"
|
|
21
|
+
|
|
22
|
+
[Date]
|
|
23
|
+
date.timezone = "UTC"
|
|
24
|
+
|
|
25
|
+
;;;;;;;;;;;;;;;;;;;;;;
|
|
26
|
+
;; PACKAGE SETTINGS ;;
|
|
27
|
+
;;;;;;;;;;;;;;;;;;;;;;
|
|
28
|
+
|
|
29
|
+
; Xdebug
|
|
30
|
+
xdebug.max_nesting_level = 512
|
|
31
|
+
xdebug.show_exception_trace = 0
|
|
32
|
+
xdebug.collect_params = 0
|
|
33
|
+
xdebug.remote_autostart = 1
|
|
34
|
+
xdebug.start_with_request = trigger
|
|
35
|
+
xdebug.mode = ${XDEBUG_MODE}
|
|
36
|
+
|
|
37
|
+
; Globals
|
|
38
|
+
expose_php = on
|
|
39
|
+
max_execution_time = 90
|
|
40
|
+
max_input_time = 900
|
|
41
|
+
max_input_vars = 10000
|
|
42
|
+
memory_limit = ${PHP_MEMORY_LIMIT}
|
|
43
|
+
upload_max_filesize = 100M
|
|
44
|
+
post_max_size = 100M
|
|
45
|
+
error_reporting = E_ALL & ~E_DEPRECATED
|
|
46
|
+
ignore_repeated_errors = on
|
|
47
|
+
html_errors = off
|
|
48
|
+
display_errors = on
|
|
49
|
+
log_errors = on
|
|
50
|
+
|
|
51
|
+
mbstring.http_input = pass
|
|
52
|
+
mbstring.http_output = pass
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Modules
|
|
4
|
+
const _ = require('lodash');
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Build Drupal 7
|
|
8
|
+
*/
|
|
9
|
+
module.exports = {
|
|
10
|
+
name: 'drupal7',
|
|
11
|
+
parent: '_drupaly',
|
|
12
|
+
config: {
|
|
13
|
+
confSrc: __dirname,
|
|
14
|
+
defaultFiles: {},
|
|
15
|
+
php: '7.2',
|
|
16
|
+
},
|
|
17
|
+
builder: (parent, config) => class LandoDrupal7 extends parent {
|
|
18
|
+
constructor(id, options = {}) {
|
|
19
|
+
super(id, _.merge({}, config, options));
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
};
|