Start of Main Content

At Velir we employ several open-source libraries and tools in our everyday work. Several years ago, we added Docker to our workflow to help streamline local development and simplify onboarding and maintenance. It was a game-changer.

What is Docker?

In short, Docker abstracts software and services into virtualized “containers” that can be chained together and run in the cloud or on your local machine and built from a configuration recipe. This cuts down the amount of time needed to install versions of software on your machine, figure out how it works on your operating system, and then have several other people on your team do the same task. What used to take days to install on individual computers can now be done in seconds.

For example, instead of having to tell each developer how to install MySQL and properly configure it on their machine (one of maybe dozens of tasks that can take hours if not days), they can just run a simple Docker command to get a project running and start developing features immediately without having to do that step manually. This has the added benefit of making setups immutable as well as being “infrastructure as code”—changing the setup of say, MySQL, happens in a configuration file and is then available to the team immediately the next time they run git pull.

We’ve written many posts on Docker, which you can view here in our blog.

Switching to DDEV

Learning Docker was a great experience for us and has been employed on every project we have done as far back as 2017. Since then, we had built and curated a development stack that consisted of common scripts and tools to make creating and running Drupal projects dead simple and requiring virtually no working knowledge of Docker at all with the goal of getting people to the point of development as fast as possible to start delivering value in a project.

The more Drupal projects we did, the more we learned, the more we rolled back into our custom Docker stack. We also learned a lot from others working on different operating systems or having different development needs, we rolled that back into our internal stack as well.

On top of that, since Docker is platform agnostic (not purpose built for Drupal, Sitecore etc) all the things we were learning helped translate across different development teams using different programming languages and different software.

  • We began engaging with clients who sought turnkey solutions beyond just Drupal itself
  • We engaged more with outside contractors who needed to acclimate to projects rapidly
  • We engaged more with other agencies who had their own established workflows
  • Providing a SBOM (software bill of materials) per project for clients became more common
  • Some engagements we were brought in near the end of the project, where changing the local environment would be too jarring
  • Maintaining our own stack was one more thing to manage. Finding the time to maintain and extend it became difficult

For these reasons, I started to plan a move to DDEV. DDEV is an open-source Docker stack designed to be a foundation for several project types (Wordpress, Drupal, Laravel, Craft, etc.) and can be run on all major operating systems. Its lead dev and creator, Randy Fay, is a long time Drupal developer and open-source evangelist.

DDEV logo

Since we spent the last few years learning Docker and Docker Compose from the ground up, integrating DDEV with what we had was really easy. All of what we built before, OS specific installs, SSH key management, best-practices settings for container environments, Drupal code standards, security and code linting were already handled by DDEV. That meant that we just needed to bring in workflow specific items such as startup scripts and version control hooks which was simple.

With our existing tool being written for a Docker based environment, all that was required was making minor changes to scripts to be DDEV aware. We got to retain all the useful helper scripts and tools under the hood with DDEV and created a new (and likely final) 4.0 release which is what we start all new client projects with. This allowed us to remove 75% of the setup boilerplate and documentation because that is all now managed by DDEV, which is exciting. All we manage now moving forward will be smaller scripts and quality of life project tools while DDEV manages the Docker infrastructure.

Contributing Back

Lastly, this provides us with an opportunity to contribute to the DDEV project in the spirit of open-source so everyone can benefit. We join the effort of other agencies making the switch in supporting DDEV and collaborating together to enhance the platform.

Immediately after switching, we were able to start contributing a couple of fixes and enhancements, such as helping add support for DBeaver, a database GUI application. Developers who prefer using that tool will soon have an easy way to connect to it from DDEV with a simple command. Over on my site, I recently wrote an article on team workflow enhancements and how to do it in DDEV. We look forward to adding more in the future.

Contribution is important to the health of any project, especially in the open-source community. Thanks to Randy Fay and the team for creating such a great tool with a smooth experience!

Get the Drupal 10 Development Cookbook

Are you curious about how to develop modules, themes, and plugins or how to be a great site builder for Drupal 10?

Get the Drupal 10 Development Cookbook 

The "Drupal 10 Development Cookbook" is co-authored by Matt Glaman and Kevin Quillen. They cover a wide variety of topics with hands-on examples so you can get up and running with Drupal 10 in no time. These topics include running Drupal locally with Docker-based tools, content modeling, creating custom modules, how to do automated testing, and migrating data into Drupal from various data sources. The book will help you understand how to develop and build modules just like the ones we talk about often at Velir.  

You can pick up the book on Amazon as a physical copy or for Kindle. 

Want to know more about how features like AI, ChatGPT, Recipes, and lightning-fast search can transform your Drupal site-building experience? Reach out.


Latest Ideas

Take advantage of our expertise with your next project.