This is the development repository for Palantir Butler Lab's Drupal 8 website. It contains the codebase and an environment to run the site for development.
- Development Environment
- Getting Started
- How do I work on this?
- Drupal Development
- Deployment
- Styleguide Development
- Additional Documentation
The development environment is based on palantirnet/the-vagrant. To run the environment, you will need:
- Mac OS X >= 10.10. This stack may run under other host operating systems, but is not regularly tested. For details on installing these dependencies on your Mac, see our Mac setup doc [internal].
- Composer
- VMWare, or virtualBox >= 5.0
- ansible
brew install ansible
- vagrant >= 1.8
- Vagrant plugins:
- vagrant-hostmanager
vagrant plugin install vagrant-hostmanager
- vagrant-auto_network
vagrant plugin install vagrant-auto_network
- vagrant-triggers
vagrant plugin install vagrant-triggers
- vagrant-hostmanager
If you update Vagrant, you may need to update your vagrant plugins with vagrant plugin update
.
- Clone the project from github:
git clone https://github.com/palantirnet/your-project.git
- From inside the project root, run:
composer install --ignore-platform-reqs
vagrant up
- You will be prompted for the administration password on your host machine
- Log in to the virtual machine (the VM):
vagrant ssh
- From within the VM, build and install the Drupal site:
phing build install migrate
- Visit your site at drupal-skeleton.local
You can edit code, update documentation, and run git commands by opening files directly from your host machine.
To run project-related commands other than vagrant up
and vagrant ssh
:
- SSH into the VM with
vagrant ssh
- You'll be in your project root, at the path
/var/www/pbl-drupal.local/
- You can run
composer
,drush
, andphing
commands from here
To work on the styleguide:
- SSH in to the VM with
vagrant ssh
- Go to the styleguide directory:
cd styleguide
; you'll be at the path/var/www/pbl-drupal.local/styleguide
- You can run butler from here with
npm run butler
, then view the styleguide in your browser at pbl-drupal.local:4000
Avoid committing to git from within your VM, because your commits won't be properly attributed to you. If you must, make sure you create a global .gitignore [internal] within your VM at /home/vagrant/.gitignore
, and configure your name and email for proper attribution:
git config --global user.email 'me@palantir.net'
git config --global user.name 'My Name'
You can refresh/reset your local Drupal site at any time. SSH into your VM and then:
- Download the most current dependencies:
composer install
- Rebuild your local CSS and Drupal settings file:
phing build
- Reinstall Drupal:
phing install
- Run your migrations:
phing migrate
- ... OR run all three phing targets at once:
phing build install migrate
Additional information on developing for Drupal within this environment is in docs/general/drupal_development.md.
@todo This section needs to be customized per-project.
- Serve the styleguide and watch for changes:
- From your VM:
cd styleguide && npm run butler
- Visit your-site.local:4000
- Hit control+c to stop
- From your VM:
Complete Butler usage is documented in docs/general/styleguide_development.md.
Project-specific:
General:
Copyright 2017 Palantir.net, Inc.