LCM Drupal 8 Scaffolding is brought to you by your friends at Last Call Media, it is a boilerplate Drupal 8 build that bundles some standard tools to make it a good starting point for an enterprise scale Drupal build. It is conceptually similar to drupal-composer/drupal-scaffold, but it has a much simpler (and more manual) Composer setup, and includes additional tools. For additional information on this project, see the 2016 Badcamp presentation slides
- Use composer to create a new project, starting from this repository as a template:
composer create-project lastcall/drupal-scaffold PROJECTNAME
- Bring up the Docker containers and enter the Drupal container.
docker-compose up -d drupal docker-compose exec drupal /bin/bash
- From the repository root (
/var/www
inside the Drupal container), install NPM and composer dependencies:yarn install composer install
- Visit the Drupal site in your browser to install Drupal and continue. The default URL will be
http://localhost:8080
.
See the scaffold documentation for next steps.
Everything below this line applies to scaffold projects that are already set up. The section below will be the start of your project's README.
This project is built using Drupal Scaffold. Before you begin, you must have Docker and Docker Compose installed on your local machine. For installation instructions, see the Drupal Scaffold - Docker documentation.
-
Clone this repository.
-
If you haven't created and set your Pantheon machine token, do that now.
-
Start the Docker environment and shell in:
docker-compose up -d drupal docker-compose exec drupal bash
-
Install Composer dependencies:
composer install
-
Install NPM dependencies:
yarn install
-
Run
composer site:import
to pull down and import a copy of the site's database. If Pantheon gives you an error here, make sure you followed Step 2 above correctly and that you're running Docker in a new terminal window -
Run
drupal site:mode dev
to switch to dev configuration. -
Run
gulp build
(orgulp watch
) anddrush cr
(from within the Drupal root at/var/www/web
) to compile the theme. -
View your new local site in the browser at http://localhost:8080/.
See the Drupal Scaffold documentation for more information on how to use the tools and how to use this project. To find more information on the Docker stack, visit the Docker documenation.
Both testing tools listed below are using the following JSON files for switching the environments and fetching the URLs for these testing tools. If any changes are needed make changes to the files below:
The option to switch environments can be used by adding the following to command --target=prod
. It will always default to local if no target is being used.
Nightcrawler will run in CircleCI for each Pull Request, but if you want to test the PR locally use the following command
$ docker-compose run drupal node_modules/.bin/nightcrawler crawl
Backstop is only tested manually, see documentation to test your branch.