Raised: $0
0% of monthly goal Help us cross the finish line!
Goal: $12,000
Raised: $0 Goal: $12,000
0% of monthly goal Help us cross the finish line!
Sponsor DDEV

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.

tests last commit release

DDEV Shopware

What is DDEV Shopware?

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:

Installation

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.

Installing a specific Shopware line

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.

Usage

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

Build everything

ddev build

Only your own extensions

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.

Watchers

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.

Configuration

Shopware project root

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:

  1. SHOPWARE_PROJECT_ROOT — explicit override
  2. your current directory, or any parent of it
  3. DDEV_COMPOSER_ROOT — set when your config.yaml uses composer_root
  4. the directory above DDEV_DOCROOT — e.g. shopware/public/var/www/html/shopware
  5. /var/www/html — Shopware sits in the project root
  6. a one-level scan of /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.

Ports

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

How it works

Removal

ddev add-on remove shopware

Use the add-on name (shopware), not the repository slug.

Resources

Credits

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.