Skip to content

Instantly share code, notes, and snippets.

@madalinignisca
Created April 4, 2015 05:03
Show Gist options
  • Save madalinignisca/25b60810dfa648f3ecd8 to your computer and use it in GitHub Desktop.
Save madalinignisca/25b60810dfa648f3ecd8 to your computer and use it in GitHub Desktop.
Database settings for Drupal 6/7/8 fo use with Docker with linked database
<?php
//...
$databases = array ();
$databases['default']['default'] = array(
'driver' => 'mysql',
'database' => getenv('DB_ENV_MYSQL_DATABASE'),
'username' => getenv('DB_ENV_MYSQL_USER'),
'password' => getenv('DB_ENV_MYSQL_PASSWORD'),
'host' => getenv('DB_PORT_3306_TCP_ADDR'),
'port' => getenv('DB_PORT_3306_TCP_PORT'),
'prefix' => '',
'collation' => 'utf8_general_ci',
);
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment