Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ We're in #ddev-for-core-dev on [Drupal Slack](https://www.drupal.org/community/c
```
git clone https://git.drupalcode.org/project/drupal.git drupal
cd drupal
ddev config --project-type=drupal10
ddev config --omit-containers=db --disable-settings-management
ddev start
ddev corepack enable
ddev get justafish/ddev-drupal-core-dev
ddev restart
ddev composer install
Expand Down
10 changes: 10 additions & 0 deletions config.ddev-drupal-core-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# #ddev-generated
# This file is placed by the justafish/ddev-drupal-core-dev addon.

webimage_extra_packages: ["chromium-driver"]
ddev_version_constraint: '>=v1.23.0'
upload_dirs:
# The install technique tries to remove all of sites/default/files
# but with DDEV + mutagen that isn't possible.
# so just redirect the upload_dirs.
- .ddev/tmp
3 changes: 2 additions & 1 deletion core-dev/phpunit-chrome.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
<!-- Do not limit the amount of memory tests take to run. -->
<ini name="memory_limit" value="-1"/>
<env name="SIMPLETEST_BASE_URL" value="DRUPAL_CORE_DDEV_URL"/>
<env name="SIMPLETEST_DB" value="mysql://db:db@db/db"/>
<!-- <env name="SIMPLETEST_DB" value="mysql://db:db@db/db"/> -->
<env name="SIMPLETEST_DB" value="sqlite://localhost/sites/default/files/db.sqlite"/>
<env name="BROWSERTEST_OUTPUT_DIRECTORY" value="/var/www/html/test_output"/>
<!-- By default, browser tests will output links that use the base URL set
in SIMPLETEST_BASE_URL. However, if your SIMPLETEST_BASE_URL is an internal
Expand Down
3 changes: 2 additions & 1 deletion core-dev/phpunit-firefox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
<!-- Do not limit the amount of memory tests take to run. -->
<ini name="memory_limit" value="-1"/>
<env name="SIMPLETEST_BASE_URL" value="DRUPAL_CORE_DDEV_URL"/>
<env name="SIMPLETEST_DB" value="mysql://db:db@db/db"/>
<!-- <env name="SIMPLETEST_DB" value="mysql://db:db@db/db"/> -->
<env name="SIMPLETEST_DB" value="sqlite://localhost/sites/default/files/db.sqlite"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 do we really want this synced with mutagen and the like? What about storing in /tmp, or if it needs to be persistent in /home/<user>/...?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review.

This is the traditional place for the sqlite file, Drupal core has used it for years.

On a normal DDEV macOS system, it would not be relavent to mutagen, since it would be bind-mounted with sites/default/files. However, with the current strategy here, ddev drupal believes drupal is installed if sites/default/files exists. But now with drush in #33 we won't have that problem as much.

IMO we should just leave it alone for now since it's the traditional location and in #34 we end up. being able to use mariadb or other traditional database types.

I'll also be doing a followup that uses tmpfs for mounting the mariadb, which is related to your persistence questions.

(Note that /home does not persist by default in a ddev-webserver environment though, but there are other options)

<env name="BROWSERTEST_OUTPUT_DIRECTORY" value="/var/www/html/test_output"/>
<!-- By default, browser tests will output links that use the base URL set
in SIMPLETEST_BASE_URL. However, if your SIMPLETEST_BASE_URL is an internal
Expand Down
4 changes: 2 additions & 2 deletions install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
name: ddev-drupal-core-dev

project_files:
- web-build/Dockerfile
- config.ddev-drupal-core-dev.yaml
- web-build/Dockerfile.ddev-drupal-core-dev
- docker-compose.core-dev-selenium.yaml
- core-dev/phpunit-firefox.xml
- core-dev/phpunit-chrome.xml
Expand All @@ -26,7 +27,6 @@ post_install_actions:
- cp core-dev/gitignore ../.gitignore
- mkdir -p ../test_output
- chmod +w ../test_output
- ddev exec corepack enable
- cd ../core && ddev yarn

removal_actions:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
#ddev-generated
# Note that the chromium-driver install could be moved to webimage_extra_packages
RUN sudo apt-get update && sudo apt-get install chromium-driver -y
# This will not be necessary in DDEV v1.23+
RUN corepack enable

# TODO:
# This section is temporary and needs to be removed when
# https://github.com/justafish/ddev-drupal-core-dev/pull/23/files#top
# is pulled, because it includes this update.
ARG TARGETPLATFORM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DDEV v1.23.1 will have sqlite3 3.45.1 (but only for Drupal 11). This is already in HEAD.

# Drupal core needs later Sqlite than Debian 12 so install from Debian Trixie.
RUN SQLITE_VERSION=3.45.1 && \
mkdir -p /tmp/sqlite3 && \
wget -O /tmp/sqlite3/sqlite3.deb https://ftp.debian.org/debian/pool/main/s/sqlite3/sqlite3_${SQLITE_VERSION}-1_${TARGETPLATFORM##linux/}.deb && \
Expand Down