Dotvault for Drupal

Dotvault for Drupal sites.

Drupal core reads settings.php, not .env, but almost every modern Drupal setup, Docker, DDEV, Lando or a hosting platform, puts the real values in a .env and lets settings.php read them from the environment. Dotvault edits that file, and knows what belongs in it.

What you get

  • Detects Drupal from drupal/core-recommended in composer.json.
  • Recognises DRUPAL_HASH_SALT, TRUSTED_HOST_PATTERNS and the MySQL connection set.
  • Knows the filesystem paths Drupal cares about: FILE_PUBLIC_PATH, FILE_PRIVATE_PATH and CONFIG_SYNC_DIRECTORY.
  • Snapshot history, so a settings change before a deploy is reversible.

Known environment variables

Dotvault recognises these variables when you open a Drupal project and surfaces helpful descriptions and warnings in the editor. Drupal is detected via drupal/core-recommended in composer.json.

  • MYSQL_DATABASE

    MySQL database name

  • MYSQL_HOSTNAME

    MySQL server host

  • MYSQL_PORT

    MySQL server port

  • MYSQL_USER

    MySQL username

  • MYSQL_PASSWORD

    MySQL password

  • DATABASE_URL

    Database connection URL

  • DRUPAL_HASH_SALT

    Hash salt for one-time links and passwords

  • DRUPAL_BASE_URL

    Site base URL

  • DRUPAL_ENV

    Environment name (dev/staging/prod)

  • TRUSTED_HOST_PATTERNS

    Trusted host patterns for security

  • DRUSH_OPTIONS_URI

    Drush site URI for CLI operations

  • FILE_PUBLIC_PATH

    Public files directory path

  • FILE_PRIVATE_PATH

    Private files directory path

  • FILE_TEMP_PATH

    Temporary files directory path

  • CONFIG_SYNC_DIRECTORY

    Configuration sync directory path

Official Drupal docs: www.drupal.org/docs