Skip to content

v1.19.0-alpha5: Improved `ddev exec` behavior

Pre-release
Pre-release
Compare
Choose a tag to compare
@rfay rfay released this 17 Feb 12:39
· 1371 commits to master since this release
ebfcaeb

Highlights of this release

  • ddev exec and lots of other commands like ddev mysql and ddev drush and ddev php now behave much better with quoted arguments.

Installation/Upgrade

See the installation instructions for details, but it's easy:

  • macOS: brew install drud/ddev-edge/ddev or just brew upgrade drud/ddev-edge/ddev ). (You may need a brew update for homebrew to find the new release.).
  • Traditional Windows: Use choco upgrade -y --pre ddev to get this one, or download the ddev_windows_installer below.
  • Linux or WSL2 (macOS works too) use the install_ddev.sh script: Download the script, make it executable, and run it with the version: ./install_ddev.sh <version> or or curl -LO https://raw.githubusercontent.com/drud/ddev/master/scripts/install_ddev.sh && bash install_ddev.sh v1.19.0-alpha5 - If you already had ddev installed with homebrew you'll want to brew unlink ddev first.
  • And anywhere, you can just download the tarball or zipball, untar or unzip it, and place the executable in your path where it belongs.
  • Consider ddev delete images after upgrading to free up disk space used by previous docker image versions. This does no harm.

🚛 Key changes

  • ddev exec and and lots of other commands like ddev mysql and ddev drush and ddev php now behave much better with quoted arguments, see #2547
  • Postgres is now supported (versions 9-14) as well as MariaDB and MySQL. ddev config --database=postgres:14. import-db, export-db, snapshot, and snapshot restore work. (Snapshots don't work with postgres:9 yet).
  • ddev get will now download and install a maintained, supported, and tested recipe for add-ons like services, custom commands and provider integrations, see docs.
  • ddev service enable and ddev service disable now enable and disable add-on services.
  • You can now run ddev without Docker Desktop on both macOS and Windows.
    • Experimental colima support on macOS works great. Note that Colima is a new project and may experience instability, but it seems to work wonderfully. 🙏🏼 to Tag1 Consulting for sponsoring this feature!
    • On Windows you can install docker inside wsl2 instead of using Docker Desktop.
  • DDEV now can work with a remote docker instance.
  • DDEV now supports docker contexts and the DOCKER_HOST environment variable.
  • You can now install the current HEAD version of ddev with brew unlink ddev && brew install --HEAD drud/ddev/ddev
  • Bare in-container hostnames: You can (once again) use in-container hostnames like db or solr without having to use fully-qualified names like ddev-<project>-db. Thanks to @jonaseberle for heroic work pioneering a path forward for this, it will make using DDEV easier for everybody.
  • You can remove all links: sections from custom service definitions that mapped a service name onto itself (e.g. links: solr:solr). This used to be needed to prioritize name resolving inside the project, but it's now taken care of by a project-local network. (However, these links: lines do no harm.)
  • WordPress default configuration is significantly improved thanks to @timnolte.
  • Database snapshots are now gzipped, resulting in perhaps 20x size difference. A snapshot that used to use 207MB on disk is now 5MB.
  • Networking:
    • There is now a dedicated project-local network which is managed by docker-compose. All project services are in that network by default, even without any networks: stanza. From inside docker-compose.*.yaml files you would refer to it as default. Its global docker network name is ddev-<projectname>_default. This change allowed us to make sure that name resolving would always prioritize project-local services.
    • There is a new network named ddev, created automatically on ddev start. Its default function is that it is the network which contains ddev-router. As such you have to add it to all services to it that need to be reached by the router, which normally means 3rd-party services that have HTTP_EXPOSE in them. (see "caveats")
    • This network is also reused for inter-project communication (for example a db that you want to access as ddev-<projectname>-db from another project during upgrading). See "caveats" on how to enable cross-project access.

Minor changes

  • Hook information like "Running ... " for a hook doesn't show by default now. If you want to see it you can export DDEV_DEBUG=true

⚠️ Caveats

  • Users with exotic workarounds to the previous bash-interpreted strings for composer and exec commands will have to simplify them.
  • Alpha testers will have a bad ~/.ddev/commands/web/php that should be removed (and will automatically be replaced)
  • Customized script commands like drush or php won't be replaced by ddev, so you may want to rm them. So for example, if you have a ~/.ddev/commands/web/drush or <project>/.ddev/commands/web/drush that does not have #ddev-generated in it, then you'll want to remove it or update it.
  • ddev no longer pesters about overridden commands (when project has a drush command that overrides the global drush command, for example)
  • xdebug now connects to the new standard port 9003 instead of port 9000. With PhpStorm this should be invisible to all, since it listens on both ports. With vscode you may have to edit the launch.json file, see https://ddev.readthedocs.io/en/latest/users/snippets/launch.json
  • A new networks stanza needs to be added to all 3rd-party docker-compose.*.yaml services that use HTTP_EXPOSE (like solr) or that want to be reached from other ddev projects (If you are unsure, add the stanza. It does not hurt):
      networks: [default, ddev_default]
  • With Colima you cannot mount single files into a container. This means that the traditional docker-compose.solr.yaml can't work, because it tries to mount a single file. However, the soon-to-be-standard ddev-contrib solr recipe should work because it doesn't try to mount a single file.
  • There are loads of significant changes here, including how docker works, how database management is done, and what docker environments you can work with. Please pay attention and report your experiences, good or bad! 🙏🏼

What's Changed

New Contributors

Full Changelog: v1.18.2...v1.19.0-alpha5