I’ve found different ways to setup a local development environment for Shopware 6 but have so far only tried Dockware. The dev image has some tools which I find amazing like watch-admin and watch-storefront, but it should be used for plugin development and not full site. What is the "best" local Shopware 6 dev environment setup?
Could you include your docker-compose.yml when you use one?
4
Answers
My vote goes to: ddev. Out of the box support of SW5/6, very good support (through discord or here on SO), good docs and very high customization.
I’ve been using it for months now on Windows 10 + WSL and it’s been an absolute breeze to work with!
Couldn’t agree more with https://stackoverflow.com/users/3329355/jim. Using ddev on Ubuntu for Shopware 5 and 6.
This is my ddev/config.yaml for a simple Shopware 6 project:
Should you want to use the storefront and/or admin watcher, add a file docker-compose.watcher.yaml to your .ddev directory:
Dockware is working fine to me for Plugin dev and "full site". You can create your own image from templates: https://github.com/dockware/dockware/tree/master/.dist/versions/master/dev/6.4.12.0
After a lot of flailing around we eventually used the shopware production repository as a template, we forked it. It seems to me that the development repository is focussed on plugin development only, not full projects. The watch admin and watch storefront features you mentioned exist on the production repository, they are shell scripts in the bin folder. We had to modify the images to get them into a workable state for us in a few ways:
We’ve not been working with this setup for long, but we are happy with it so far: we wanted to have development and production setups using the same repo, and minimally different docker setups, and this approach ticks all those boxes. I have to say we weren’t aware of dockware at the point of doing all this, but there are some advantages of doing things in house I guess.