Skip to content

Commit

Permalink
Merge branch 'master' into 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed Mar 8, 2024
2 parents 7064257 + bac7ec7 commit 9c8a892
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 34 deletions.
20 changes: 2 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,12 @@ ARG BASE_IMAGE_TAG

FROM wodby/php:${BASE_IMAGE_TAG}

ENV DRUSH_LAUNCHER_FALLBACK="/home/wodby/.composer/vendor/bin/drush" \
\
PHP_REALPATH_CACHE_TTL="3600" \
ENV PHP_REALPATH_CACHE_TTL="3600" \
PHP_OUTPUT_BUFFERING="16384"

USER root

RUN set -ex; \
\
# We keep global drush version 8 because newer version do not support drupal 7 and \
# mostly D7 projects are not composer-based and can't install newer drush as a part of their composer project.
su-exec wodby composer global require drush/drush:^8.0; \
drush_launcher_url="https://github.com/drush-ops/drush-launcher/releases/download/0.10.2/drush.phar"; \
wget -O drush.phar "${drush_launcher_url}"; \
chmod +x drush.phar; \
mv drush.phar /usr/local/bin/drush; \
\
# Drush extensions
su-exec wodby mkdir -p /home/wodby/.drush; \
drush_rr_url="https://ftp.drupal.org/files/projects/registry_rebuild-7.x-2.5.tar.gz"; \
wget -qO- "${drush_rr_url}" | su-exec wodby tar zx -C /home/wodby/.drush; \
\
# Drupal console
console_url="https://github.com/hechoendrupal/drupal-console-launcher/releases/download/1.9.7/drupal.phar"; \
Expand All @@ -39,8 +24,7 @@ RUN set -ex; \
chmod 775 "${FILES_DIR}/config"; \
\
# Clean up
su-exec wodby composer clear-cache; \
su-exec wodby drush cc drush
su-exec wodby composer clear-cache

USER wodby

Expand Down
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ All images built for `linux/amd64` and `linux/arm64`
| Tool | 8.2 | 8.1 |
|---------------------------|--------|--------|
| [Drupal Console Launcher] | 1.9.7 | 1.9.7 |
| [Drush] | 8 | 8 |
| [Drush Launcher] | 0.10.2 | 0.10.2 |
| [Drush Registry Rebuild] | 7.x | 7.x |

## Environment Variables

Expand Down Expand Up @@ -81,7 +78,3 @@ See [wodby/docker4drupal](https://github.com/wodby/docker4drupal)
[_(Dockerfile)_]: https://github.com/wodby/drupal-php/tree/master/Dockerfile

[Drupal Console Launcher]: https://drupalconsole.com
[Drush]: https://packagist.org/packages/drush/drush
[Drush Launcher]: https://github.com/drush-ops/drush-launcher
[Drush Patchfile]: https://bitbucket.org/davereid/drush-patchfile
[Drush Registry Rebuild]: https://www.drupal.org/project/registry_rebuild
8 changes: 4 additions & 4 deletions tests/10/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ run_action() {
make "${@}" -f /usr/local/bin/actions.mk
}

echo -n "Checking drush... "
drush version --format=yaml
echo "OK"

echo -n "Checking environment variables... "
env | grep -q ^DOCROOT_SUBDIR=
env | grep -q ^DRUPAL_VERSION=
Expand All @@ -52,6 +48,10 @@ COMPOSER_MEMORY_LIMIT=-1 composer install -n
composer require drush/drush
composer require drupal/redis

echo -n "Checking drush... "
drush version --format=yaml
echo "OK"

cd "${DRUPAL_ROOT}"

run_action files-import source="${FILES_ARCHIVE_URL}"
Expand Down
10 changes: 5 additions & 5 deletions tests/7/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ run_action() {
make "${@}" -f /usr/local/bin/actions.mk
}

echo -n "Checking drush... "
drush version --format=yaml
echo "OK"

echo -n "Checking environment variables... "
env | grep -q ^DOCROOT_SUBDIR=
env | grep -q ^DRUPAL_VERSION=
Expand All @@ -58,7 +54,11 @@ cd "${DRUPAL_ROOT}"
run_action files-import source="${FILES_ARCHIVE_URL}"
run_action init-drupal

drush si -y --db-url="${DB_DRIVER}://${DB_USER}:${DB_PASSWORD}@${DB_HOST}/${DB_NAME}"
echo -n "Checking drush... "
drush version --format=yaml
echo "OK"

drush si -vvv -y --db-url="${DB_DRIVER}://${DB_USER}:${DB_PASSWORD}@${DB_HOST}/${DB_NAME}"
drush en varnish redis -y --quiet

run_action cache-clear
Expand Down

0 comments on commit 9c8a892

Please sign in to comment.