What's all that stuff in the .ddev directory?¶
It can be a little confusing trying to understand all the things that are in the project's .ddev directory, so here it is all on one place. Note that you may have some directories or files that are not listed here - they may be added from custom services. For example, if you see a solr directory, it probably pertains to a custom solr add-on service.
apachedirectory: Apache configuration for those usingwebserver_type: apache-fpm. There are docs and the default configuration in there. See apache customization docs.commandssubdirectories: Contains DDEV shell commands (both built-in and custom) that can run on the host or inside any container. See docs.config.yamlfile: This is the basic configuration file for the project. Take a look at the comments below for suggestions about things you can do, or look in docs).config.*.yamlfiles: You can add configuration here that overrides the config in theconfig.yaml. This is nice for situations where one developer's project needs one-off configuration. For example, you could turn on or offnfs-mount-enabledormutagen-enabledor use a different database type. By default, these are gitignored, so will not get checked in. See docsdb-builddirectory: Can be used to provide a custom Dockerfile for the database container.db_snapshotsdirectory: This is where snapshots go when youddev snapshot. If you don't need these backups, you can delete anything there at any time. See snapshot docs.docker-compose.*.yamlfiles: Advanced users can provide their own services or service overrides usingdocker-compose.*.yamlfiles. See custom compose files andadditional services. Also see the many examples in ddev-contrib.homeadditionsdirectory: Anything you put in thehomeadditionsdirectory (including both files and directories) will be copied into the web container on startup. This lets you easily override the default home directory contents (.profile,.bashrc,.composer,.ssh) or anything you want to put in there. It could also include scripts that you want to have easily available inside the container. (Note that you can do the same thing globally in~/.ddev/homeadditions.) See homeadditions docs.mutagendirectory: containsmutagen/mutagen.ymlwhere you can override the default mutagen configuration. See mutagen docs.mysqldirectory: contains optionalmysqlormariadbconfiguration. See mysql docs.nginxdirectory: (deprecated) can be used for add-on nginx snippets.nginx_fulldirectory: Contains the nginx configuration used by the web container, which can be customized following the instructions there. See providing custom nginx configuration.postgresdirectory: containspostgres/postgresql.confwhich can be edited if needed (and remove the#ddev-generatedline at the top to take it over.)providersdirectory: Contains examples and implementations showing ways to configure DDEV soddev pullcan work. You can useddev pullwith hosting providers like Acquia or Platform.sh or Pantheon and also can use it with local files or custom database/files sources. See providers docsweb-builddirectory: You can add a custom Dockerfile that adds things into the docker image used for your web container. See Customizing images.xhprofdirectory: Contains thexhprof_prepend.phpfile that can be used to customize xhprof behavior for different types of website. See xhprof profiling.
Things not to look at or mess with :)¶
The hidden files (that begin with a "." are not intended to be fiddled with, and are hidden for that reason, and most are regenerated (and thus overwritten) on every ddev start:
.dbimageBuilddirectory: The generated Dockerfile used to customize the db container on first start..ddev-docker-compose-base.yaml: The base docker-compose file used to describe a project..ddev-docker-compose-full.yaml: This is the result of preprocessing.ddev-docker-compose-base.yamlusingdocker-compose config. Mostly it replaces environment variables with their values..gitignore: The.gitignoreis generated by DDEV and should generally not be edited or checked in. (It gitignores itself to make sure you don't check it in.) It's generated on everyddev startand will change as DDEV versions change, so if you check it in by accident it will always be showing changes that you don't need to see ingit status..global_commands: This is a temporary directory that is used to get global commands available inside a project. You shouldn't ever have to look there..homeadditions: This is a temporary directory used to consolidate globalhomeadditionswith project-levelhomeadditions. You shouldn't ever have to look here..webimageBuilddirectory: The generated Dockerfile used to customize the web container on first start.
Last update: July 7, 2022