git clone git@github.com:pulibrary/rbsc_drupal.git
cp sites/default/default.settings.php sites/default/settings.php
In your local sites/default/settings.php
file include the following lando-style db config values:
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'drupal7',
'username' => 'drupal7',
'password' => 'drupal7',
'host' => 'database',
'port' => '3306',
'driver' => 'mysql',
'prefix' => '',
),
),
);
# needed for CAS logins to work
$base_url = "http://rbsc.lndo.site";
Add the following useful local development configuration to the end of sites/default/settings.php
/* Overrides for the local environment */
$conf['securepages_enable'] = 0;
/* This should be set in your php.ini file */
ini_set('memory_limit', '1G');
/* Turn off all caching */
$conf['css_gzip_compression'] = FALSE;
$conf['js_gzip_compression'] = FALSE;
$conf['cache'] = 0;
$conf['block_cache'] = 0;
$conf['preprocess_css'] = 0;
$conf['preprocess_js'] = 0;
/* end cache settings */
/* Turn on theme debugging. Injects the path to every Template utilized in the HTML source. */
$conf['theme_debug'] = TRUE;
/* Makes sure jquery is loaded on every page */
/* set to false in production */
$conf['javascript_always_use_jquery'] = TRUE;
mkdir .ssh
# excluded from version controlcp $HOME/.ssh/id_rsa .ssh/.
cp $HOME/.ssh/id_rsa.pub .ssh/.
// key should be registered in princeton_ansible deploy rolelando start
cp drush/rbsc-example.aliases.drushrc.php drush/rbsc.aliases.drushrc.php
drush/rbsc.aliases.drushrc.php
file to match the current remote drupal environment
$aliases['prod'] = array (
'uri' => 'https://rbsc.princeton.edu',
'root' => '', // Add root
'remote-user' => 'deploy', // Add user
'remote-host' => 'app-server-name', // Add app server host name
'ssh-options' => '-o PasswordAuthentication=no -i .ssh/id_rsa',
'path-aliases' => array(
'%dump-dir' => '/tmp',
),
'source-command-specific' => array (
'sql-sync' => array (
'no-cache' => TRUE,
'structure-tables-key' => 'common',
),
),
'command-specific' => array (
'sql-sync' => array (
'sanitize' => TRUE,
'no-ordered-dump' => TRUE,
'structure-tables' => array(
// You can add more tables which contain data to be ignored by the database dump
'common' => array('cache', 'cache_*', 'history', 'sessions', 'watchdog', 'cas_data_login', 'captcha_sessions'),
),
),
),
);
$aliases['local'] = array(
'root' => '/app', // Path to project on local machine
'uri' => 'http://rbsc.lndo.site',
'path-aliases' => array(
'%dump-dir' => '/tmp',
'%files' => 'sites/default/files',
),
);
.htaccess
and find RewriteBase /special-collections
and comment the line out.lando db-import backup-YYYY-MM-DD-{environment}.sql.gz
lando drush rsync @rbsc.prod:%files @rbsc.local:%files
lando drush uli your-username
cd sites/all/themes/rbsc
lando npm install
lando gulp deploy
(or any other gulp task)http://rbsc.lndo.site/admin/config/search/search_api/server/rbsc_solr_core/edit
search
/solr/rbsc
http://rbsc.lndo.site/admin/config/search/search_api/server/rbsc_solr_core
and click Delete all indexed data
button on the bottom left of the pagelando drush search-api-index
will index all content to the local solr indexlando drush cc all
will update the caches to show the data