Storefront and Admin Watchers with ddev

This page explains the setup and use of Shopware's storefront and admin watchers.

First of all, install a file docker-compose.watcher.yaml with the following content right in your .ddev folder:

# .ddev/docker-compose.watcher.yaml
services:
    web:
        expose:
            - 9997
            - 9998
            - 9999
        environment:
            - ESLINT_DISABLE=true
            - HOST=0.0.0.0
            - PORT=9997
            - HTTP_EXPOSE=${DDEV_ROUTER_HTTP_PORT}:80,${DDEV_MAILHOG_PORT}:8025,9999:9999,9998:9998,9997:9997
            - HTTPS_EXPOSE=${DDEV_ROUTER_HTTPS_PORT}:80,${DDEV_MAILHOG_HTTPS_PORT}:8025,8899:9999,8888:9998,8887:9997

Then restart your project with ddev restart.

(Note that you can have only one project with active watchers up at one time, as the watcher ports will be the same for all projects.)

The important thing to notice is that both watchers work on the http scheme only (at least using this simple setup). Since most browser ‘remember’ the scheme for a given URL, it is recommended to start your watchers in a new incognito or private browser instance.

Admin Watcher

Start the admin watcher with bin/watch-administration.sh (production template) or composer watch:admin (contribution template).

To reach the admin watcher, point your browser to http://<my-project>.ddev.site:9997 (omit the /admin slug!).

Storefront Watcher

Start the storefront watcher with bin/watch-storefront.sh (production template) or composer watch:storefront (contribution template).

To reach the storefront watcher, you need to create (or rename) a sales channel domain with http://<my-project>.ddev.site. Then point your browser to http://<my-project>.ddev.site:9998.

Last updated