Skip to content
Snippets Groups Projects
settings.docker.php.twig 1.4 KiB
Newer Older
  • Learn to ignore specific revisions
  • jurgenhaas's avatar
    jurgenhaas committed
    <?php
    
    
    {% if drupal.version >= 8 %}
    
    jurgenhaas's avatar
    jurgenhaas committed
    $settings['trusted_host_patterns'] = array(
    
      '^{{ webserver.type }}$',
    
    {% for domain in extradomains|default([]) %}
      '^{{ domain|replace({".": "\\."}) }}$',
    {% endfor %}
    
    jurgenhaas's avatar
    jurgenhaas committed
    );
    
    jurgenhaas's avatar
    jurgenhaas committed
    $databases = array(
      'default' => array(
        'default' => array(
    
    jurgenhaas's avatar
    jurgenhaas committed
          'driver' => 'mysql',
          'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
          'database' => 'drupal',
          'username' => 'drupal',
          'password' => 'drupal',
          'host' => 'mariadb',
          'port' => '3306',
          'prefix' => '',
        ),
      ),
    );
    
    $config['smtp.settings']['smtp_host'] = 'mailhog';
    $config['smtp.settings']['smtp_hostbackup'] = '';
    $config['smtp.settings']['smtp_port'] = '1025';
    $config['smtp.settings']['smtp_protocol'] = 'standard';
    $config['smtp.settings']['smtp_username'] = '';
    $config['smtp.settings']['smtp_password'] = '';
    
    {% elseif drupal.version <= 7 %}
    
    jurgenhaas's avatar
    jurgenhaas committed
    $databases = array(
      'default' => array(
        'default' => array(
          'driver' => 'mysql',
          'host' => 'mariadb',
          'username' => 'drupal',
          'password' => 'drupal',
          'database' => 'drupal',
          'prefix' => '',
        ),
      ),
    );
    
    $base_url = 'http://{{ projectname }}.docker.localhost:8000';
    $conf['smtp_host'] = 'mailhog';
    $conf['smtp_hostbackup'] = '';
    $conf['smtp_port'] = '1025';
    $conf['smtp_protocol'] = 'standard';
    $conf['smtp_username'] = '';
    $conf['smtp_password'] = '';
    {% endif %}