-
Notifications
You must be signed in to change notification settings - Fork 10
Developing locally with Drupal VM
Download and install vagrant
- Install Vagrant
- Install Ansible
- Go to http://docs.ansible.com/ansible/intro_installation.html and follow directions for your system.
- OSX http://docs.ansible.com/ansible/intro_installation.html#latest-releases-on-mac-osx
or
brew install ansible
Recommended Versions: Vagrant 1.8.1, VirtualBox 5.0.14, and Ansible 2.0.0
-
Fork our repo: https://github.com/Drupal4Gov/Drupal-GovCon-2016
-
Check out a local copy of your fork.
git clone git@github.com:[you]/Drupal-GovCon-2016.gitcd Drupal-GovCon-2016 -
Add a remote for upstream:
git remote add upstream git@github.com:Drupal4Gov/Drupal-GovCon-2016.git -
Checkout the
developbranch.git checkout develop -
Update from upstream repo
git pull upstream develop
-
Go to the box directory to configure DrupalVM (our local dev environment tool)
cd box -
Copy example.config.yml to config.yml
cp example.config.yml config.yml -
Run ansible galaxy setup:
sudo ansible-galaxy install -r provisioning/requirements.yml --force -
Run
vagrant up -
Go inside box via
vagrant ssh
cd /var/www/drupalgovcon
composer install
-
Install node for front end build (IMPORTANT, build will fail if skipped)
/var/www/drupalgovcon/docroot/sites/all/themes/custom/govcon_2016/install-node.sh 4.3.2source ~/.bashrc && nvm use --delete-prefix 4.3.2npm install -g grunt-cli -
Run
./task.sh setup:drupal:settingsThis will generatedocroot/sites/default/settings/local.settings.phpanddocroot/sites/default/local.drushrc.php. Update these with your local database credentials and your local site URL. For DrupalVM the db credentials are drupal, drupal, drupal
Example local.settings.php
<?php
/**
* For a single database configuration, the following is sufficient:
**/
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'drupal',
'username' => 'drupal',
'password' => 'drupal',
'host' => 'localhost',
'port' => '3306',
'driver' => 'mysql',
'prefix' => '',
),
),
);
// Disable virus scanning on uploaded files.
$conf['clamav_enabled'] = 0;
$conf['clamav_enable_element_image_widget'] = 0;
$conf['clamav_enable_element_file_widget'] = 0;
$conf['cron_safe_threshold'] = 0;
$conf['error_level'] = 1;
$conf['stage_file_proxy_origin'] = '';
$conf['theme_debug'] = TRUE;
- Run
./task.sh setup. This will build all project dependencies and install drupal.
After this initial setup, you should only need to run ./task.sh setup:build:all
when composer.json is updated, and ./task.sh setup:drupal:install when you
need to reinstall the site.
For a full list of available project tasks, run ./task.sh -l. See
project-tasks.md for more information.
TODO (in the meantime: http://docs.drupalvm.com/en/latest/other/windows/ )
TODO