NBCUTechnology / pubstack

⛔️ [DEPRECATED] Publisher's DevStack
MIT License
8 stars 8 forks source link

Add settings.*.php instructions #195

Closed robcolburn closed 7 years ago

robcolburn commented 8 years ago

Getting config.yml correct and settings correct was a burnt finger moment. We can discuss and provide a template. There are a little different per brand, but there's more similar that we can share. Part of it relates to config.yaml

For me, I needed to make /var/www/.nbc/nbcunbc.settings.php

<?php

$conf['pub_site_shortname'] = 'nbcunbc';  // <--- This should match the folder name under sites

/**
 * Set the path to drush as a conf variable so it doesn't get overridden every
 * time you copy down the database from production.
 */
$conf['pub_utilities_drush_bin'] = '/usr/local/bin/drush';

// Define the current environment.
$_ENV['AH_SITE_ENVIRONMENT'] = 'local';
$base_url = 'http://local.nbc.com';

$databases['default'] = array ('default' =>
  array (
    'database' => 'nbc',  // <--- Typically "publisher7_<sitename>"
    'username' => 'root',
    'password' => '',            // <--- Intentionally left blank
    'host' => '127.0.0.1',
    'port' => '',
    'driver' => 'mysql',
    'prefix' => '',
  ),
);

I believe nbc came from the subscription or shortname from config.yml

helior commented 8 years ago

For visibility to the dpim folks, the above ~/.nbc path is something we added to our NBC instance of pub7 as a developer convenience to store private $conf overrides outside of the repo. Some of the above "templated" values will definitely change (AH_SITE_ENVIRONMENT, for instance).

Some more obvious guidance on how to connect to the DB would be nice, though.

scottrigby commented 7 years ago

See #194.