Martin Weinmayr
Martin Weinmayr

Dockware: making Shopware instances running locally in minutes (Part 2/2)

Published at Jan 22nd 2024
  CEO @ dasistweb
  CEO
  dasistweb
   Holzkirchen, Germany
 

How does Dockware help on Shopware development and why should we also adopt it?

There are many reasons indeed.

When Shopware 6 was released, the installation was sometimes really hard and frustrating. That has obviously been improved a lot by now, but there are things that people are still struggling with, like using the watchers for the Storefront and Administration.

Dockware helps you to get rid of topics that you don’t need to fight with, while still trying to keep it as transparent and standard as possible.

If you need a specific Shopware 6 version to just start coding, use Dockware and after a few clicks you’re ready. If you want to install your very own Shopware version, spawn a container, download any Shopware version and start with the installation process. If you have a massive container ecosystem, then just use a plain dockware/flex image that has at least all these PHP versions and things you need for coding.

For the watchers, expose the ports, and run our simple make commands and you’re done. Switching to a different PHP version? Just switch during runtime to any of the supported versions. XDebug…up and running, just use it. And all that on MAC, Linux and Windows.

When you’re done with local development, you can even use it in your CI/CD pipelines. Because it has everything installed, you can easily build artifacts without having to install different tools and frameworks first. You can run tests, static analyzers and more.

Running full E2E tests with Cypress for instance is really easy.

Let’s imagine you create a plugin. Just use dockware to launch multiple Shopware versions in different PHP versions. Install your plugin and just start your Cypress tests. It just works.

And even in addition to this, we try to teach people how to use Docker, what and why something works and what the benefit might be. We have a huge user guide by now, where we discuss things like Bind-Mounting, different hosting strategies and way more.

So as you see, it’s hard to describe the benefits in just 1 sentence.

It’s not only a product anymore, but something to make the developer experience with Shopware 6 as easy as possible for all these different use cases.

What do you consider the coolest thing in Dockware? What is your highlight for those who are reading to you?

My personal highlight is the usage within CI/CD systems with Cypress.

If you create full shops, or just standalone plugins, it’s always hard to spawn up shops in a pipeline. You need to install and prepare so many things.

With dockware, I can simply launch a preferred Shopware version with 1 single line of code. I can even declare what PHP version I want to use.

And then all I have to do is, to maybe import my custom database and install my plugins, or just install my plugin if I’m only a plugin manufacturer. That’s it, I can then start to simply run my Cypress tests.

I love to use that in the Mollie plugins for instance.

Whenever there is a new Shopware version, I just add that version to the test matrix on Github and decide on what PHP version to use. And with just a single, new declaration, I suddenly have a full Cypress Test Suite running in e.g. a new Shopware 6.4.10.1 with PHP 8.1….and also in PHP 7., if I would want to.

When I talked to agencies and developers who implement Mollie plugins for other platforms, I always got asked how we create the environment in such pipelines. It’s quite a lot for them to do so.

And I was always like “Yeah…I have that 1 line of code with dockware…”.

In case you missed, read "part 1" here!