From 70bc15310ef2c61ed3badaad8b6c6771b3e8cd6b Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 2 Sep 2019 10:45:56 +1000 Subject: [PATCH 1/6] Updated Amazeeio images to v1.0.1. --- .docker/Dockerfile.cli | 2 +- .docker/Dockerfile.nginx-drupal | 2 +- .docker/Dockerfile.php | 2 +- .docker/Dockerfile.solr | 2 +- docker-compose.yml | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.docker/Dockerfile.cli b/.docker/Dockerfile.cli index b1414919f..6513d2a5c 100644 --- a/.docker/Dockerfile.cli +++ b/.docker/Dockerfile.cli @@ -1,5 +1,5 @@ # @see https://github.com/amazeeio/lagoon/tree/master/images/php/cli-drupal -FROM amazeeio/php:7.2-cli-drupal-v0.22.1 +FROM amazeeio/php:7.2-cli-drupal-v1.0.1 ENV WEBROOT=docroot \ COMPOSER_ALLOW_SUPERUSER=1 \ diff --git a/.docker/Dockerfile.nginx-drupal b/.docker/Dockerfile.nginx-drupal index bdec5a43b..bf87be2c2 100644 --- a/.docker/Dockerfile.nginx-drupal +++ b/.docker/Dockerfile.nginx-drupal @@ -2,7 +2,7 @@ ARG CLI_IMAGE FROM ${CLI_IMAGE:-cli} as cli -FROM amazeeio/nginx-drupal:v0.22.1 +FROM amazeeio/nginx-drupal:v1.0.1 ENV WEBROOT=docroot diff --git a/.docker/Dockerfile.php b/.docker/Dockerfile.php index 23b7d8295..493e6d11e 100644 --- a/.docker/Dockerfile.php +++ b/.docker/Dockerfile.php @@ -2,7 +2,7 @@ ARG CLI_IMAGE FROM ${CLI_IMAGE:-cli} as cli -FROM amazeeio/php:7.2-fpm-v0.22.1 +FROM amazeeio/php:7.2-fpm-v1.0.1 # Enable Xdebug only if XDEBUG_ENABLE has a value. # @see https://github.com/amazeeio/lagoon/issues/1170 diff --git a/.docker/Dockerfile.solr b/.docker/Dockerfile.solr index 59e806f6f..204b40253 100644 --- a/.docker/Dockerfile.solr +++ b/.docker/Dockerfile.solr @@ -2,6 +2,6 @@ ARG CLI_IMAGE FROM ${CLI_IMAGE} as cli -FROM amazeeio/solr:6.6-drupal-v0.22.1 +FROM amazeeio/solr:6.6-drupal-v1.0.1 # Uncomment below after installing search_api_solr module (it must exist in the codebase). # COPY --from=cli /app/docroot/modules/contrib/search_api_solr/solr-conf/6.x/ /solr-conf/conf/ diff --git a/docker-compose.yml b/docker-compose.yml index dfbc9b415..897b45125 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -122,7 +122,7 @@ services: #;> LAGOON mariadb: - image: amazeeio/mariadb-drupal:v0.22.1 + image: amazeeio/mariadb-drupal:v1.0.1 environment: <<: *default-environment ports: @@ -134,7 +134,7 @@ services: #;< REDIS redis: - image: amazeeio/redis:v0.22.1 + image: amazeeio/redis:v1.0.1 #;< LAGOON labels: lagoon.type: redis From bfe0a7117aa533766b606ffdb531a4f6415ca46e Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 2 Sep 2019 10:48:03 +1000 Subject: [PATCH 2/6] Removed temporary overrides for XDebug. --- .docker/Dockerfile.cli | 5 --- .docker/Dockerfile.php | 4 --- .docker/scripts/.gitkeep | 0 .docker/scripts/60-php-xdebug.sh | 46 ------------------------ .docker/scripts/61-php-xdebug-cli-env.sh | 17 --------- 5 files changed, 72 deletions(-) create mode 100644 .docker/scripts/.gitkeep delete mode 100755 .docker/scripts/60-php-xdebug.sh delete mode 100755 .docker/scripts/61-php-xdebug-cli-env.sh diff --git a/.docker/Dockerfile.cli b/.docker/Dockerfile.cli index 6513d2a5c..bf12513eb 100644 --- a/.docker/Dockerfile.cli +++ b/.docker/Dockerfile.cli @@ -6,11 +6,6 @@ ENV WEBROOT=docroot \ COMPOSER_CACHE_DIR=/tmp/.composer/cache \ MYSQL_HOST=mariadb -# Enable Xdebug only if XDEBUG_ENABLE has a value. -# @see https://github.com/amazeeio/lagoon/issues/1170 -COPY .docker/scripts/60-php-xdebug.sh /lagoon/entrypoints/60-php-xdebug.sh -COPY .docker/scripts/61-php-xdebug-cli-env.sh /lagoon/entrypoints/61-php-xdebug-cli-env.sh - RUN apk update \ && apk add pv \ && rm -rf /var/cache/apk/* diff --git a/.docker/Dockerfile.php b/.docker/Dockerfile.php index 493e6d11e..08a9f3024 100644 --- a/.docker/Dockerfile.php +++ b/.docker/Dockerfile.php @@ -4,8 +4,4 @@ FROM amazeeio/php:7.2-fpm-v1.0.1 -# Enable Xdebug only if XDEBUG_ENABLE has a value. -# @see https://github.com/amazeeio/lagoon/issues/1170 -COPY .docker/scripts/60-php-xdebug.sh /lagoon/entrypoints/60-php-xdebug.sh - COPY --from=cli /app /app diff --git a/.docker/scripts/.gitkeep b/.docker/scripts/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/.docker/scripts/60-php-xdebug.sh b/.docker/scripts/60-php-xdebug.sh deleted file mode 100755 index cf961561e..000000000 --- a/.docker/scripts/60-php-xdebug.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -# Tries to find the Dockerhost -get_dockerhost() { - # https://docs.docker.com/docker-for-mac/networking/#known-limitations-use-cases-and-workarounds - if busybox timeout -t 1 ping -c1 docker.for.mac.localhost &> /dev/null; then - echo "docker.for.mac.localhost" - return - fi - - # https://docs.docker.com/docker-for-windows/release-notes/#docker-community-edition-17060-win13-release-notes-2017-06-01-17060-rc1-ce-win13-edge - if busybox timeout -t 1 ping -c1 docker.for.win.localhost &> /dev/null; then - echo "docker.for.win.localhost" - return - fi - - # https://github.com/amazeeio/pygmy/blob/267ba143158548628f190f05ecb5cb2c19212038/lib/pygmy/resolv_osx.rb#L26 - if busybox timeout -t 1 ping -c1 172.16.172.16 &> /dev/null; then - echo "172.16.172.16" - return - fi - - # Fallback to default gateway (should work on Linux) see https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach - echo $(route -n | awk '/UG[ \t]/{print $2}') - return -} - -# Only if XDEBUG_ENABLE is not empty -if [ ! -z ${XDEBUG_ENABLE} ]; then - # remove first line and all comments - sed -i '1d; s/;//' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - # add comment that explains how we have xdebug enabled - sed -i '1s/^/;xdebug enabled as XDEBUG_ENABLE is not empty, see \/lagoon\/entrypoints\/60-php-xdebug.sh \n/' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - - # Only if DOCKERHOST is not already set, allows to set a DOCKERHOST via environment variables - if [[ -z ${DOCKERHOST+x} ]]; then - DOCKERHOST=$(get_dockerhost) - fi - - # Add the found remote_host to xdebug.ini - echo -e "\n\nxdebug.remote_host=${DOCKERHOST}" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - - if [ ${XDEBUG_LOG+x} ]; then - echo -e "\n\nxdebug.remote_log=/tmp/xdebug.log" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - fi -fi diff --git a/.docker/scripts/61-php-xdebug-cli-env.sh b/.docker/scripts/61-php-xdebug-cli-env.sh deleted file mode 100755 index 3db4afa3f..000000000 --- a/.docker/scripts/61-php-xdebug-cli-env.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# Only if XDEBUG_ENABLE is not empty -if [ ! -z ${XDEBUG_ENABLE} ]; then - # XDEBUG_CONFIG is used by xdebug to decide if an xdebug session should be started in the CLI or not. - # The content doesn't really matter it just needs to be set, the actual connection details are loaded from /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - export XDEBUG_CONFIG="idekey=lagoon" - - # PHP_IDE_CONFIG is used by PhpStorm and should be the URL of the project, we use the `LAGOON_ROUTE` for it (if it exists) - if [ ${LAGOON_ROUTE+x} ]; then - SERVERNAME=$(echo $LAGOON_ROUTE | sed 's/https\?:\/\///') - else - SERVERNAME="lagoon" - fi - export PHP_IDE_CONFIG="serverName=${SERVERNAME}" -fi - From 00159ea56f243c432d46b3f87ea5139048892e1b Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 2 Sep 2019 13:31:14 +1000 Subject: [PATCH 3/6] Added temp fix for NPM notworking correctly. --- .docker/Dockerfile.cli | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.docker/Dockerfile.cli b/.docker/Dockerfile.cli index bf12513eb..a4367c11f 100644 --- a/.docker/Dockerfile.cli +++ b/.docker/Dockerfile.cli @@ -10,6 +10,9 @@ RUN apk update \ && apk add pv \ && rm -rf /var/cache/apk/* +# @todo: Remove once https://github.com/amazeeio/lagoon/issues/1212 is fixed. +RUN apk upgrade + ENV DOCKERIZE_VERSION v0.6.1 RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ && tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ From 570017d489faa4fe1e0b736d17dce437169318f7 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 2 Sep 2019 13:43:49 +1000 Subject: [PATCH 4/6] Upgraded node-sass. --- package-lock.json | 88 +++++++++++++++-------------------------------- package.json | 2 +- 2 files changed, 28 insertions(+), 62 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3be6690ca..c67e50947 100644 --- a/package-lock.json +++ b/package-lock.json @@ -423,9 +423,9 @@ "dev": true }, "combined-stream": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", - "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, "requires": { "delayed-stream": "~1.0.0" @@ -1066,9 +1066,9 @@ "dev": true }, "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -1989,36 +1989,18 @@ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "dev": true }, - "lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", - "dev": true - }, "lodash.capitalize": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/lodash.capitalize/-/lodash.capitalize-4.2.1.tgz", "integrity": "sha1-+CbJtOKoUR2E46yinbBeGk87cqk=", "dev": true }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, "lodash.kebabcase": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=", "dev": true }, - "lodash.mergewith": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", - "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", - "dev": true - }, "loud-rejection": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", @@ -2136,18 +2118,18 @@ "dev": true }, "mime-db": { - "version": "1.37.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", - "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", "dev": true }, "mime-types": { - "version": "2.1.21", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", - "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", "dev": true, "requires": { - "mime-db": "~1.37.0" + "mime-db": "1.40.0" } }, "mimic-fn": { @@ -2193,9 +2175,9 @@ "dev": true }, "nan": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", - "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", "dev": true }, "natural-compare": { @@ -2254,9 +2236,9 @@ } }, "node-sass": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.11.0.tgz", - "integrity": "sha512-bHUdHTphgQJZaF1LASx0kAviPH7sGlcyNhWade4eVIpFp6tsn7SV8xNMTbsQFpEV9VXpnwTTnNYlfsZXgGgmkA==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.12.0.tgz", + "integrity": "sha512-A1Iv4oN+Iel6EPv77/HddXErL2a+gZ4uBeZUy+a8O35CFYTXhgA8MgLCWBtwpGZdCvTvQ9d+bQxX/QC36GDPpQ==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -2266,12 +2248,10 @@ "get-stdin": "^4.0.1", "glob": "^7.0.3", "in-publish": "^2.0.0", - "lodash.assign": "^4.2.0", - "lodash.clonedeep": "^4.3.2", - "lodash.mergewith": "^4.6.0", + "lodash": "^4.17.11", "meow": "^3.7.0", "mkdirp": "^0.5.1", - "nan": "^2.10.0", + "nan": "^2.13.2", "node-gyp": "^3.8.0", "npmlog": "^4.0.0", "request": "^2.88.0", @@ -2627,9 +2607,9 @@ "dev": true }, "psl": { - "version": "1.1.31", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", - "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.3.0.tgz", + "integrity": "sha512-avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag==", "dev": true }, "punycode": { @@ -3502,20 +3482,6 @@ "block-stream": "*", "fstream": "^1.0.12", "inherits": "2" - }, - "dependencies": { - "fstream": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", - "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } - } } }, "text-table": { @@ -3696,9 +3662,9 @@ "dev": true }, "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", + "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", "dev": true }, "validate-npm-package-license": { diff --git a/package.json b/package.json index 3d02048b5..01435db3d 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "grunt-sass-globbing": "^1.5.1", "grunt-sass-lint": "^0.2.4", "gruntify-eslint": "5.0.0", - "node-sass": "^4.11.0", + "node-sass": "^4.12.0", "sass-lint": "^1.12.1" }, "scripts": { From a0277784c0a9ee465aaa69e14e69dcab96c5b3c4 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 2 Sep 2019 15:34:05 +1000 Subject: [PATCH 5/6] Updated URLs for databases. --- .ahoy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ahoy.yml b/.ahoy.yml index a1d79d748..80cb45c23 100644 --- a/.ahoy.yml +++ b/.ahoy.yml @@ -304,9 +304,9 @@ entrypoint: #;< DEMO #; Location of the demo database used for demonstration only. #; This will be removed during project install. - export DEMO_DB="${DEMO_DB:-https://gist.githubusercontent.com/alexdesignworks/838bea313c1d5f2c7c912693954f0619/raw/7aa622c72d91554d056ee56933b9cb570c765e8f/db_d8.dist.sql}" + export DEMO_DB="${DEMO_DB:-https://raw.githubusercontent.com/wiki/integratedexperts/drupal-dev/db_d8.dist.sql.md}" #; Location of the demo database used for tests only. - export DEMO_DB_TEST="${DEMO_DB_TEST:-https://gist.githubusercontent.com/alexdesignworks/4387f56278be8597b5f27868d15e798f/raw/2bdfc4cfb28678caf5e9a73c44fe28b3eddc6316/db_d8.star_wars.sql}" + export DEMO_DB_TEST="${DEMO_DB_TEST:-https://raw.githubusercontent.com/wiki/integratedexperts/drupal-dev/db_d8.star_wars.sql.md}" #;> DEMO #;< FRESH_INSTALL export DOCTOR_CHECK_DB=0 From 6224f090db5497c7ce329e989ffda8debff7994b Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 2 Sep 2019 22:19:20 +1000 Subject: [PATCH 6/6] Updated apk upgrade. --- .docker/Dockerfile.cli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/Dockerfile.cli b/.docker/Dockerfile.cli index a4367c11f..1a0861a8e 100644 --- a/.docker/Dockerfile.cli +++ b/.docker/Dockerfile.cli @@ -11,7 +11,7 @@ RUN apk update \ && rm -rf /var/cache/apk/* # @todo: Remove once https://github.com/amazeeio/lagoon/issues/1212 is fixed. -RUN apk upgrade +RUN apk upgrade nghttp2-libs ENV DOCKERIZE_VERSION v0.6.1 RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \