If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.
A DDEV add-on that turns the usual shopware-cli incantations into short, memorable commands — and installs the tooling they need.
After ddev add-on get + ddev restart you can run ddev build or ddev watch in any Shopware
project, with no per-project setup.
Key features:
ddev build, ddev watch, plus the individual Administration and Storefront
variants.shopware-cli and Deployer are built into the
web image; the watcher ports are published through ddev-router.ddev watch runs both watchers at once and prints their URLs, while the
Storefront watcher keeps its interactive TTY for theme and sales-channel selection.working_dir/composer_root, from whatever directory you run the command in.ddev add-on get zone1987/ddev-shopware
ddev restart
The ddev restart is required: it builds shopware-cli into the web image and opens the watcher
ports. Commit the .ddev directory to version control afterwards.
Shopware’s build tooling changes between minor versions, so this add-on is maintained in one branch
per Shopware line — there is no main. The command above installs the latest release, which tracks
the current line.
Pin an exact release so a later change cannot surprise you:
ddev add-on get zone1987/ddev-shopware --version v6.7.0
Or follow a line’s branch to always get its newest state:
ddev add-on get zone1987/ddev-shopware --version 6.7
Releases are versioned v<shopware-line>.<patch> — v6.7.0, v6.7.1, … all target Shopware 6.7.
Every command takes an optional scope. Without one, it processes the whole project.
| Command | Description |
|---|---|
ddev build |
Build Administration and Storefront |
ddev watch |
Start both watchers in parallel |
ddev admin-build |
Build the Administration |
ddev admin-watch |
Start the Administration watcher |
ddev storefront-build |
Build the Storefront |
ddev storefront-watch |
Start the Storefront watcher |
ddev build
static restricts the build to your custom static extensions — much faster during development:
ddev build static
plugin narrows it further to a named list:
ddev build plugin SwagPluginA
ddev build plugin SwagPluginA SwagPluginB
Both scopes work with every command, e.g. ddev admin-watch plugin SwagPluginA.
ddev watch
Once both dev servers are listening, their URLs are printed:
| Watcher | URL |
|---|---|
| Administration | https://<project>.ddev.site:5173 |
| Storefront | https://<project>.ddev.site:9998 |
The Storefront watcher runs in the foreground and keeps its interactive TTY, so its theme and
sales-channel/domain prompts work normally. Press Ctrl+C once to stop both watchers.
The commands run shopware-cli from the Shopware root inside the web container. You do not
need working_dir or composer_root set, and it does not matter whether you run the command from
the project root or after cd-ing into the shop yourself.
The root is resolved in this order:
SHOPWARE_PROJECT_ROOT — explicit overrideDDEV_COMPOSER_ROOT — set when your config.yaml uses composer_rootDDEV_DOCROOT — e.g. shopware/public → /var/www/html/shopware/var/www/html — Shopware sits in the project root/var/www/html/*Every candidate except the explicit override has to prove itself: it only counts if it holds a
composer.json requiring a shopware/* package. So a wrong guess is never used silently — if
nothing matches, the command fails with a clear message instead of building the wrong tree.
For layouts none of that reaches, set the path yourself:
ddev dotenv set .ddev/.env.shopware --shopware-project-root=/var/www/html/shopware
ddev restart
Commit the .ddev/.env.shopware file to version control.
The watcher ports and environment live in .ddev/config.shopware.yaml. Don’t edit that file — it is
overwritten on the next ddev add-on get. To change something, override it in your own
.ddev/config.shopware-local.yaml, which DDEV merges on top:
web_extra_exposed_ports:
- name: shopware-admin-proxy
container_port: 5173
http_port: 6172
https_port: 6173
| Purpose | Container | HTTPS | HTTP |
|---|---|---|---|
| Administration (Vite) | 5173 | 5173 | 5172 |
| Storefront proxy | 9998 | 9998 | 8888 |
| Storefront assets | 9999 | 9999 | 8889 |
web-build/Dockerfile.shopware — installs shopware-cli from the FriendsOfShopware package
repository and a pinned Deployer release into DDEV’s web image.config.shopware.yaml — publishes the watcher ports through ddev-router and sets the
environment the watchers expect (HOST, PORT, PROXY_URL, STOREFRONT_SKIP_SSL_CERT, …).commands/web/.shopware-cli-command — the shared implementation. It locates the Shopware root
(verifying each candidate against its composer.json), checks that shopware-cli is present, and
translates the scope argument into the matching shopware-cli project flags
(--only-custom-static-extensions / --only-extensions). The leading dot keeps it out of
ddev help.commands/web/* — thin wrappers around it. build chains both builds; watch runs the
Administration watcher in the background, the Storefront watcher in the foreground so it keeps its
TTY, and prints the URLs once both ports accept connections.ddev add-on remove shopware
Use the add-on name (shopware), not the repository slug.
Maintained by @zone1987
If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.