Skip to content


DDEV Application configuration for Skpr projects

The application will need to be configured for database conncections and compatability for mailpit.

Note: Other services such as Solr or ElasticSearch are not yet featured here.

We'll be isolating configuration for the sake of DDEV in its own file, so you'll need to include it from the settings.php file. Be careful with the file names if you are already including files via globbing.

An environment variable, IS_DDEV_PROJECT, will be set to true on the application's container, so you may use this to selectively target the settings file inclusion logic.

There's an environment variable you can target for including the file -

And for the main configuration below, we've copied a boilerplate configuration DDEV provides for Drupal 10 sites. We've also changed the credentials to match up with the creds on the database image for local development.


// Database connection using Skpr Docker images.
$databases['default']['default']['database'] = "local";
$databases['default']['default']['username'] = "local";
$databases['default']['default']['password'] = "local";
$databases['default']['default']['host'] = "database";
$databases['default']['default']['port'] = 3306;
$databases['default']['default']['driver'] = "mysql";

// Prevent Drupal from setting read-only permissions on sites/default.
$settings['skip_permissions_hardening'] = TRUE;

// This will ensure the site can only be accessed through the intended host
// names. Additional host patterns can be added for custom configurations.
$settings['trusted_host_patterns'] = ['.*'];
// Don't use Symfony's APCLoader. ddev includes APCu; Composer's APCu loader has
// better performance.
$settings['class_loader_auto_detect'] = FALSE;

// Override drupal/symfony_mailer default config to use Mailpit
$config['symfony_mailer.mailer_transport.sendmail']['plugin'] = 'smtp';

// Enable verbose logging for errors.
$config['system.logging']['error_level'] = 'verbose';