Kalabox 2 Settings / Special Setups, etc.
Wiki for repository for Special setups of Kalabox2
DEPRECATED
Sharing
File system sharing can be slow if we're trying to sync too many files between the host system and the container. These settings should alleviate most problems.Â
sharing: share: 'data:/code' ignore: - Name sites/default/files - Name *node_modules* - Name *bower_components* - Name *vendor* paths: - index.php - sites/default - sites/all/modules/features - sites/all/modules/custom - sites/all/themes
Note that for sites with a Composer build you will need to include `web/` at the start of each pathÂ
Composer Builds
For sites that are built with composer you need to change some config paths for it to work.
Go to 'config/nginx' and open drupal.conf (or drupal8.conf if it is a D8 site). Change all instances of /code to /code/web
Save the file and then kbox rebuild && kbox restart
CiviCRM
In civicrm.settings.php if you are using a pressflow site add this in under the  if (!empty($env['conf']['pantheon_binding'])) conditional:
// Kalabox2 settings elseif (strpos($_SERVER['HTTP_HOST'],'kbox') !== false) { // Set the DB connection string $db_string = $env['databases']['default']['default']['driver'] . '://' . $env['databases']['default']['default']['username'] . '@'; $db_string .= $env['databases']['default']['default']['host'] . '/' . $env['databases']['default']['default']['database'] . '?new_link=true'; define( 'CIVICRM_UF_DSN' , $db_string); define( 'CIVICRM_DSN' , $db_string); global $civicrm_root; $civicrm_root = '/code/sites/all/modules/civicrm/'; define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/code/sites/default/files/civicrm/templates_c/' ); define( 'CIVICRM_UF_BASEURL' , 'http://' . $_SERVER['HTTP_HOST'] . '/' ); }
(note that formerly "$_SERVER['APPDOMAIN']" was used instead of "$_SERVER['HTTP_HOST']")