![[Translate to English:] [Translate to English:]](/fileadmin/_processed_/6/3/csm_lokale-entwicklung-ddev_060d094ebd.webp)
How we develop Software, Part 2: Local Development Environment
In the first part of our series about our way to develop good software, we highlighted the importance of using a version control system. Today's post is about how we can quickly and easily set up projects locally to be ready to work at all.
Modern web applications use numerous components; in order to display anything in the browser at all, we need a web server like Apache or Nginx, PHP in the correct version, a database, but also numerous other pieces of software to manipulate images, access APIs or a search server like solr. And of course we need all this - ideally in an identical or at least very similar configuration - on every single development machine.
In addition, it must be possible to import the data of the live system onto the development environment in a way that is at least halfway up to date; for example, in order to be able to recreate an error that may have its cause in the code or also due to incorrect input of data.
To meet these requirements, we worked with virtualization systems early on and finally found our solution with DDEV, a Docker-based local development system.
On the one hand, we can use Docker containers to assemble all the software components we need for a project. Even multiple projects at the same time with very different requirements are no problem, which is sometimes essential for testing client/server components at the same time.
Also, all DDEV configuration is also under version control; this means that a developer can check out a new project from version control within minutes and have a working copy on the local machine using one command. This has allowed us to optimize setup times for projects.
Also, a current database state and file assets (each from the previous day) are synchronized from a cache to the local machine with one command. Even very large projects are ready to work on a developer's computer in less than 15 minutes. If necessary, the data is automatically anonymized, which I will discuss in more detail in a later part of this series.
For our customers, this means faster results and less onboarding time. Our developers are happy about a standardized project setup and can concentrate on the essentials without having to waste time in the project setup.
Thanks to the standardized structure of our projects, our developers find their way around all our projects in no time at all. Setting up a new project takes no longer than getting a fresh cup of coffee from the kitchen - and freshly caffeinated and with the project up and running, our developers are happy to throw themselves into the tasks. :)