DDEV is a Docker-based local development tool for PHP/CMS projects (Drupal, WordPress, Laravel, Magento, TYPO3, etc.). It provides per-project containers with a web server, database, and services — configured via a .ddev/ directory in each project.
ansible-playbook playbooks/imports/optional/common/play-ddev.ymlThis installs:
- mkcert — local HTTPS certificate authority (bundled with the DDEV RPM; Fedora's standalone
mkcertpackage is removed first because it conflicts file-for-file) - DDEV — via the official yum repository at
pkg.ddev.com
Prerequisite: Rootful Docker must be installed first (it is an optional play — podman-first policy):
ansible-playbook playbooks/imports/optional/common/play-docker.ymlThis installs Docker CE as a system-wide daemon and adds your user to the docker group. After the first run you must log out and back in (or run newgrp docker in your shell) before docker commands work without sudo.
This repo's default container engine is rootless Podman (CCY, devtools, ad-hoc containers). DDEV is the one compatibility exception: upstream DDEV explicitly recommends rootful Docker on Linux as the best-performance, best-stability path, and the rootless Podman workarounds (storage driver switch, bind-mount quirks, --no-bind-mounts flag) were judged too invasive — particularly because they risked the CCY image. See CLAUDE/ContainerEngines.md for the full role split and security trade-offs (notably: docker group membership is root-equivalent).
ddev version
mkcert -versioncd ~/Projects
git clone git@github.com:Edmonds-Commerce-Limited/project-name.git
cd project-nameThe repo should contain a .ddev/ directory with a config.yaml — this defines the project type, PHP version, database, and services.
ls .ddev/config.yamlIf the .ddev/ directory exists, the project is DDEV-ready.
EC projects include a ddev.env.php with database and cache settings for DDEV. Symlink it into place before starting:
ln -sf ddev.env.php app/etc/env.phpThis replaces the production env.php with the DDEV-specific configuration (database host, credentials, cache backends, etc.).
Forgot to do this before ddev start? No problem — create the symlink and restart:
ln -sf ddev.env.php app/etc/env.php
ddev restart
ddev exec bin/magento cache:flushddev startThis pulls and starts the containers (web server, database, etc.) based on .ddev/config.yaml. First run downloads images and takes longer.
If the project needs a database dump:
# Import a SQL file
ddev import-db --file=path/to/database.sql.gz
# Or from an uncompressed file
ddev import-db --file=path/to/database.sqlSupported formats: .sql, .sql.gz, .sql.bz2, .sql.xz, .zip, .tar, .tar.gz, .tgz.
# Open in browser
ddev launch
# Or check the URL
ddev describeDDEV provides HTTPS URLs with locally-trusted certificates (via mkcert).
No /etc/hosts changes needed. DDEV uses three layers:
- Public wildcard DNS — The
ddev.sitedomain has DNS records that resolve*.ddev.siteto127.0.0.1(localhost). Your project URL (e.g.https://project-name.ddev.site) already points to your machine. - ddev-router — A traefik reverse proxy container listens on ports 80/443 on localhost. It receives the request and routes it to the correct project container based on the hostname.
- mkcert — Provides locally-trusted HTTPS certificates for
*.ddev.site, so the browser trusts the connection without warnings.
Request flow: browser → DNS (*.ddev.site → 127.0.0.1) → ddev-router (port 80/443) → project container.
| Command | Description |
|---|---|
ddev start |
Start project containers |
ddev stop |
Stop project containers |
ddev restart |
Restart containers |
ddev describe |
Show project info and URLs |
ddev launch |
Open site in browser |
ddev ssh |
SSH into the web container |
ddev import-db |
Import a database dump |
ddev export-db |
Export the database |
ddev composer |
Run Composer inside the container |
ddev mysql |
Open MySQL/MariaDB client |
ddev logs |
View container logs |
ddev poweroff |
Stop all DDEV projects and networks |
ddev list |
List all DDEV projects |
ddev config |
Configure DDEV for a new project |
If a project doesn't have DDEV configuration:
cd ~/Projects/project-name
ddev configFollow the prompts to set project type, PHP version, and docroot. This creates the .ddev/ directory. Commit it to the repo so others can use it.
# Check Docker status (system-wide daemon)
sudo systemctl status docker --no-pager -l
# Start Docker
sudo systemctl start docker
# If `docker info` fails with "permission denied" but the daemon is running,
# your shell is missing the `docker` group. Either log out and back in, or:
newgrp docker# See what's using the port
ddev describe
ss -tlnp | grep :80
# Change ports in .ddev/config.yaml:
# router_http_port: 8080
# router_https_port: 8443# Remove containers and database (keeps files)
ddev delete -O
# Start fresh
ddev start# Web server logs
ddev logs
# Database logs
ddev logs -s dbSince DDEV is installed via yum repo, upgrade with:
sudo dnf upgrade ddev